无论悬停在 IE6 和 IE7 上都不起作用
下面是我的菜单的 css
#menu
{
position: absolute;
left: 170px;
top: 92px;
background: #336699;
float: left;
z-index:50;
}
#menu ul
{
list-style: none;
margin: 0;
padding: 0;
width: 9em;
float: left;
}
#menu a, #menu h2
{
font: bold 11px/20px arial, helvetica, sans-serif;
display: block;
border-top-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-width: 1px;
border-style: solid;
border-color: #ccc #888 #555 #bbb;
margin: 0;
padding: 4px 3px;
}
#menu h2
{
color: #fff;
background: #336699;
text-transform: uppercase;
border-top-width: 0px;
border-bottom-width: 0px;
border-left-width: 1px;
border-right-width: 1px;
}
#menu a
{
color: #fff;
background: #79A3CF;
text-decoration: none;
}
#menu a:hover
{
color: #a00;
background: #fff;
}
#menu li
{
position: relative;
}
#menu li ul li
{
position: relative;
width: 12em;
}
#menu ul ul
{
position: absolute;
z-index: 500;
}
#menu ul ul ul
{
position: absolute;
top: 0;
left: 100%;
}
div#menu ul ul, div#menu ul li:hover ul ul, div#menu ul ul li:hover ul ul
{
display: none;
}
div#menu ul li:hover ul, div#menu ul ul li:hover ul, div#menu ul ul ul li:hover ul
{
display: block;
}
这是我的菜单 html 设计。这是一个带有下拉子菜单的水平菜单,
<div id="menu">
<ul>
<li><h2>Computers</h2>
<ul>
<li>subitem
<ul><li>subitems</li>
</li>
<li>submitem</li>
<li>submitem</li>
</li>
<li><h2>Network</h2>
<ul><li>subitems</li>
</li>
</ul>
</div>
我正在使用任何悬停脚本的缩小版本。检查了一些关于这个问题的帖子,但无法解决问题。子菜单不会出现在 IE6 和 IE7 上。我尝试添加
<!--[if lt IE 8]>
但没有结果...
Below is the css for my menu
#menu
{
position: absolute;
left: 170px;
top: 92px;
background: #336699;
float: left;
z-index:50;
}
#menu ul
{
list-style: none;
margin: 0;
padding: 0;
width: 9em;
float: left;
}
#menu a, #menu h2
{
font: bold 11px/20px arial, helvetica, sans-serif;
display: block;
border-top-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-width: 1px;
border-style: solid;
border-color: #ccc #888 #555 #bbb;
margin: 0;
padding: 4px 3px;
}
#menu h2
{
color: #fff;
background: #336699;
text-transform: uppercase;
border-top-width: 0px;
border-bottom-width: 0px;
border-left-width: 1px;
border-right-width: 1px;
}
#menu a
{
color: #fff;
background: #79A3CF;
text-decoration: none;
}
#menu a:hover
{
color: #a00;
background: #fff;
}
#menu li
{
position: relative;
}
#menu li ul li
{
position: relative;
width: 12em;
}
#menu ul ul
{
position: absolute;
z-index: 500;
}
#menu ul ul ul
{
position: absolute;
top: 0;
left: 100%;
}
div#menu ul ul, div#menu ul li:hover ul ul, div#menu ul ul li:hover ul ul
{
display: none;
}
div#menu ul li:hover ul, div#menu ul ul li:hover ul, div#menu ul ul ul li:hover ul
{
display: block;
}
Here is my html design for the menu. It is a horizontal menu with dropdown submenus
<div id="menu">
<ul>
<li><h2>Computers</h2>
<ul>
<li>subitem
<ul><li>subitems</li>
</li>
<li>submitem</li>
<li>submitem</li>
</li>
<li><h2>Network</h2>
<ul><li>subitems</li>
</li>
</ul>
</div>
I am using the minified version of the whatever hover script. Checked few posts here on this issue but couldn't solve the problem. The submenus are not appearing on IE6 and IE7. I trid adding
<!--[if lt IE 8]>
but no results...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的 HTML 格式不正确。 **表示添加。
Your HTML is poorly formed. ** indicates additions.
检查格式不良的 html 和其他 html 问题的一种好方法是在 w3c 验证器此处中验证您的 html通过使用验证器来确保我的 html 兼容,我通常可以很轻松地消除浏览器差异问题。
One good way to check for poorly formed html and other html problems is to validate your html in the w3c validator here.By using the validator to make sure my html is compliant, I can usually weed out browser discrepancies issues pretty easily.