简体   繁体   English

IE7中的Jquery交叉淡入淡出问题

[英]Jquery cross-fade rollover problems in IE7

I built some cross fade rollovers in IE7 using this single image technique: http://jqueryfordesigners.com/image-cross-fade-transition/ 我使用此单一图像技术在IE7中构建了一些交叉淡入淡出过渡: http : //jqueryfordesigners.com/image-cross-fade-transition/

It works by placing the rollover image in the background and fading the original image state when the user rollovers the image. 它通过将翻转图像放置在背景中并在用户翻转图像时使原始图像状态褪色来工作。 IE7 hates it. IE7讨厌它。 The rollover state shows up directly below the original image. 翻转状态显示在原始图像的正下方。

You can check it out here: http://hardtopdepot.com/dev/inner.html 您可以在这里查看: http : //hardtopdepot.com/dev/inner.html

It should be pretty obvious in IE7 but the add to cart buttons are suppossed to be Jquery rollovers. 在IE7中应该很明显,但是“添加到购物车”按钮应该是Jquery过渡。 I am by no means a JS expert so Im not sure how to go about solving this problem, any suggestions would be very helpful. 我绝不是JS专家,所以我不确定如何解决此问题,任何建议都将非常有帮助。 Thanks- 谢谢-

You could just use simple CSS (example here: http://sophie-g.net/jobs/css/e_buttons.htm ) to do the same thing. 您可以只使用简单的CSS(例如: http//sophie-g.net/jobs/css/e_buttons.htm )来做同样的事情。

Or 要么

Use Scriptaculous ( http://script.aculo.us/ ) if you want to have fancier timed fading. 如果您想获得更好的定时衰落,请使用Scriptaculous( http://script.aculo.us/ )。 This way you wouldnt have to spend time working on browser compatibility issues. 这样,您就不必花时间在浏览器兼容性问题上。

I guess it's a bug in the plugin. 我猜这是插件中的错误。 They check for browser names in the plugin, which is always a bad sign (not future-proof). 他们会检查插件中的浏览器名称,这始终是一个不好的信号(并非面向未来)。

Anyways, it seems like the buttons you want are just text-buttons with fading background-color. 无论如何,似乎您想要的按钮只是带有褪色背景色的文本按钮。 Why can't you just tweak the link to look like a button, and use the jQuery Color Animations plugin ?. 您为什么不可以只调整链接使其看起来像一个按钮,然后使用jQuery Color Animations插件 This solution is better for in page search and screen readers. 此解决方案更适合页面搜索和屏幕阅读器。

I've created a simple demo for you here: http://jsbin.com/egiha4/2 我在这里为您创建了一个简单的演示: http : //jsbin.com/egiha4/2

Source: http://jsbin.com/egiha4/2/edit 资料来源: http : //jsbin.com/egiha4/2/edit

Needs some styling and a click handler or a href attribute. 需要一些样式和点击处理程序或href属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM