IE6中针对jQuery Tab的奇怪错误 [英] Strange bug in IE6 for jQuery Tab

查看:97
本文介绍了IE6中针对jQuery Tab的奇怪错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此页面上

http://www.eamobile.com/Web/mobile-games

http://www.eamobile.com/Web/mobile-games

在IE6中,我们单击热门iPhone游戏,热门手机游戏,员工图片"标签 在IE6中,该类未更改,并且在选项卡内容区域内单击时已更改.而在FF和IE7中,效果很好.

In IE6 while we click on the Tab "Top iPhone Games , Top Mobile Games , Staff pics" the class is not changed in the IE6 and while click inside the tab content area its changed. while in FF and IE7 its works fine.

请告诉我们您是否有解决方案.

please let us know if you have some solution for this.

推荐答案

问题

您的问题归结为以下两个规则:

Issue

Your problem boils down to these two rules:

.topPicksTabs li a.topPicks1:active{
width:235px;
background-position:-238px -112px;
}

.topPicksTabs li.selected a.topPicks1{
background-position:-238px -168px;
}

一旦选择了选项卡,后者应该覆盖前者...但是,IE6中:active伪类的实现是越野车,使其具有优先权.最终结果是您观察到的行为,即只要标签具有焦点,便会使用错误的背景精灵显示标签.

The latter should override the former once a tab has been selected... however, the implementation of the :active pseudo-class in IE6 is quite buggy, allowing it to take precedence. The end result is the behavior you've observed, where a tab is displayed using the wrong background sprite so long as it has focus.

  • 丢弃伪类,而推荐使用mousedown + mouseup事件处理程序,该事件处理程序添加和删除另一个CSS类.然后修改您的样式,使其由该类而不是伪类触发.
  • 或者,什么也不做.该错误不会影响网站的可用性,并且随着时间的流逝,IE6的重要性将越来越低.
  • Drop the pseudo-class in favor of mousedown + mouseup event handlers that add and remove another CSS class. Then modify your style to be triggered by that class instead of the pseudo-class.
  • Alternately, do nothing. The bug does not affect the usability of the site, and as time goes on IE6 will continue to become less and less relevant.

这篇关于IE6中针对jQuery Tab的奇怪错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆