子菜单在IE8上消失

时间:2013-05-21 19:11:16

标签: html css menu internet-explorer-8 submenu

在IE8中,一旦鼠标离开主菜单链接,子菜单就会消失,因此无法点击下拉列表中的任何项目,因为子菜单立即消失。我无法找到我的代码中可能出现的问题。

CSS

#menu{width:978px; margin-left:0; padding-left:10px; height:40px; position:absolute; 
top:180px; height:109px; padding:3px 0 0 55px;}
#menu li{float:left; padding-top:9px; display:block;}
#menu li a{display:block; }

#menu li ul{display:none;}
#menu li:hover ul{display:block !important; position:absolute; padding-left:0; overflow:hidden; visibility:visible }
#menu li:hover li{float:none; }

.submenu{padding:0 5px 5px 5px !important; background:#ac0700; box-shadow:3px 3px 3px rgba(0,0,0,0.15); border:1px solid #560400; z-index:9999 !important; position:absolute; min-width:135px; margin-left:0; padding-left:0; display:block}
.submenu:hover{overflow:visible; display:block}
.submenu li a{font-size:12px; padding:6px 15px; border-right:none !important;color:#fff; padding:5px !important }
.submenu li a:hover{ background:#930600 !important; text-decoration:none !important; overflow:visible;}

HTML

<ul id="menu">
<li><a href="javascript: void(0)">Link</a>
<ul class="submenu">
<li><a href="#">Link</a></li>
</ul>
</li>
</ul>

0 个答案:

没有答案