2010-02-14 81 views
4

http://cambridgeuplighting.com/testimonialsjQuery的DIV懸停功能在Firefox

這個代碼在Safari瀏覽器,IE7和IE8,但不是在FF 3.5.7不工作。當您將鼠標懸停在div上時,代碼會更改小背景圖標的背景。

jQuery(function($){ 
$('.oneThird').hover(function(){ 
    $(this).find('span.icon').css({'background-position-y': '-60px'}); 
}, function(){ 
    $(this).find('span.icon').css({'background-position-y': '0px'}); 
}); 
}); 

有人可以幫忙嗎?非常感謝。

回答

6

firefox不支持background-position-y,因爲您可以看到here。改爲使用background-position: 0 -60px;(因此包括x和y位置指令)。