div:hover在IE浏览器下失效的问题,求解决方案,附源代码。
在遨游、Chrome浏览器都可以,就是IE浏览器不可以(IE9),用IETESTER的各个版本IE也不行。下面是代码(只是一个导航):
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>新实验</title> <style type="text/css"> /*nav*/#navBox{ width:959px; height:30px; margin:0 auto; background-color:#EEEEEE; border:1px solid #DDDDDD;}#navul{ list-style-type:none;}.navmenu{ margin-left:0px; cursor:pointer; float:left; width:150px; height:30px; line-height:30px; text-align:center; background-color:#CD950C; border-top:1px solid #DDDDDD; border-bottom:1px solid #DDDDDD;}.navmenu:hover{ background-color:#A0522D; border:1px solid #8B4513;}ul{ margin-left:0px; padding-left:0px; margin-top:0px;}li{ float:left;}/*footer*/#footer{ margin:0 auto; margin-bottom:0px; width:959px; height:100; border:1px solid #DDDDDD;}#footerul{ list-style-type:none;} </style> </head> <body> <div id="navBox"> <ul id="navul"> <li> <div class="navMenu" > Home </div> </li> <li> <div class="navMenu"> Portfolio </div> </li> <li> <div class="navMenu"> Blank </div> </li> <li> <div class="navMenu"> Guestbook </div> </li> <li> <div class="navMenu"> About </div> </li> </ul> </div> <div id="footer"> <dt id="footerul"> <dd> <div>这是一个还未完成的网站</div> </dd> </dt> </div> </body></html>