作者:林友骏091 | 来源:互联网 | 2023-09-25 23:58
ImusingtheCSSbasedrollovertrickthatswitchesthebackgroundpositionoftheelementsback
I'm using the CSS based rollover "trick" that switches the background position of the element's background image on hover.
我使用基于CSS的翻转“技巧”来切换元素背景图像的背景位置。
The CSS
CSS
#welcome #step1
{background: transparent url(../img/mock/homepage_welcome_step1.png) no-repeat scroll left top;}
#welcome #step1:hover
{background: transparent url(../img/mock/homepage_welcome_step1.png) no-repeat scroll right top;}
The HTML
HTML
Naturally IE6 messes this simple thing up. All my rollovers blink.
当然,IE6把这个简单的东西搞砸了。我所有的滚动闪烁。
Upon mouse over the image vanishes for a moment then moves to the over state. An interesting quirk, if I navigate away from the page then press the BACK button the problem seems to go away!
鼠标在图像上消失片刻,然后移动到超状态。一个有趣的怪癖是,如果我离开页面,然后按下后退按钮,问题似乎就消失了!
I'm thinking it has to do with the PNG image files (though they don't have any transparency) Or perhaps something simple as doc type (XHTML transitional)
我认为它与PNG图像文件有关(尽管它们没有任何透明性),或者可能是简单的doc类型(XHTML过渡)
Thanks for your insight.
谢谢你的见解。
EDIT (SOLVED):
编辑(解决):
Jitendra provided the link to solve the problem. I simply added this to the head:
Jitendra提供了解决该问题的链接。我只是把这个加到头部:
6 个解决方案