2012-09-18 154 views
0

我正在使用CSS悬停效果(更改背景位置)与精灵图像,它的工作罚款火狐,但在IE浏览器中工作正常,任何我需要添加在下面码?悬停效果在IE浏览器中无法正常工作

.social ul li { width:32px; height:32px; float:left; margin:10px 10px 0px 0px; 
padding:20px 0px;} 
.social ul li:last-child { margin:0px} 
.social ul li.twitter a{ background:url(../images/grey_bg_sprite.png) no-repeat 0px 
-192px; width:32px; height:32px;} 
.social ul li.twitter a:hover {background:url(../images/grey_bg_sprite.png) no-repeat 0px 
-226px; width:32px; height:32px; } 
+2

什么版本的IE ????? – Spudley

+0

显示小提琴。使用JSFIDDLE.NET –

回答

1

根据IE的版本,:悬停不会,如果你的<a>没有与它非空字符串的HREF工作。所以,如果你的a看起来像这样:<a class="foo">Bar</a>那么它需要这样的href:<a href="#" class="foo">Bar</a>老版本的IE不会认为它是一个没有填充href属性的有效锚标签,所以会忽略:hover psuedoclass。

相关问题