【问题标题】:jQuery div hover function not working in FirefoxjQuery div 悬停功能在 Firefox 中不起作用
【发布时间】:2011-01-16 18:19:30
【问题描述】:

http://cambridgeuplighting.com/testimonials

此代码适用于 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'} );
 });
}); 

有人可以帮忙吗?非常感谢。

【问题讨论】:

    标签: jquery html hover firefox3.5 background-position


    【解决方案1】:

    firefox 不支持背景位置-y,如您所见here。请改用background-position: 0 -60px;(因此包括 x 和 y 位置指令)。

    【讨论】:

      猜你喜欢
      • 2012-11-11
      • 1970-01-01
      • 1970-01-01
      • 2011-08-12
      • 1970-01-01
      • 2022-01-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多