CSS菜单,无法在FF中显示

来源:百度知道 编辑:UC知道 时间:2024/05/21 09:56:49
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=gb2312" />
<title>css
菜单</title>
<style>
body{
background-color:#B8B8A0;
}
#fbtn{
display:none;
overflow:hidden;
border-style:solid;
border-width:1px;
border-color:#e1e1c9
#e1e1c9 #6e6e56 #6e6e56;
padding:1 1 1
1;
width:115px;
height:30px;
}
#fbtn_txt{
position:relative;
}
#fbtn_txt
div{
height:30px;
padding-top:11px;
font-size:12px;
font-family:small
fonts;
color:#800080;
text-align:center;
cursor:hand;
}
#fbtn_mask{
background-color:#ffffff;
position:relative;
width:100%;
height:100%;
}
</style>
</head>

<body>
<div
id=fbtn>
<div id=fbtn_mask></div>
<div
id=fbtn_txt>

看到你的代码,汗!

很明显的IE only,估计你编写代码的时候也是用IE做的测试的。

出错原因:css错误,FF解释过程中,直接中途退出。或者js错误导致CSS无法显示效果。

简单说几点吧:

问题一:
“padding:1 1 1
1; ”这样写明显不对,就算是写在一行里也不对,只有0才可以省略px,
正确写法:padding:1px;

问题二:
cursor:hand; /*---这是IE only--*/
正确写法:cursor:pointer;

问题三:
<div id=fbtn_mask></div>
规范写法:<div id="fbtn_mask"></div>

Js是否有错误,就不再调试了,你自己看下,希望以上内容对你有所帮助。