ie6 a:hover span
今天在项目中遇到了这样的一个怪事,IE6 a:hover 背景不消失
最后找到了解决办法,对hover加上
#tabs1 a:hover {zoom:1; padding:0}
- <title>ie6 a:hover span bug</title>
- <style type="text/css">
- <!--
- body {
- margin:0;
- padding:0;
- }
- img {
- border: none;
- }
-
- #tabs1 a span {
- display:block;
- background:url("1.jpg") no-repeat;
- width:110px; height:30px;
- }
- #tabs1 a:hover {zoom:1; padding:0}
- #tabs1 a:hover span {
- background:url("2.jpg") no-repeat
- }
- -->
- </style>
- </head>
- <body>
- <div id="tabs1">
- <a href="#"><span> </span></a>
- </div>
- </body>
- </html>
补充:IE6 如果要a:hover (鼠标移上去)有效,href必须不为空;