以下fadeIn , fadeOut效果在 Firefox 3.0 中工作正常,但在 IE 7 中不起作用......这是什么以及有什么技巧?这个想法当然是为了获得“闪烁”效果并将用户的注意力吸引到表中的特定行。
function highLightErrorsAndWarnings() {
$(".status-error").fadeIn(100).fadeOut(300).fadeIn(300).fadeOut(300).fadeIn(300).fadeOut(300).fadeIn(300);
$(".status-warning").fadeIn(100).fadeOut(300).fadeIn(300).fadeOut(300).fadeIn(300).fadeOut(300).fadeIn(300);
}
更新:发现了愚蠢的问题...“.status-error”指向一个 tr 元素。在 Firefox 中可以设置背景颜色并使其在 tr 上淡入淡出,但在 IE 中不行。将“CSS 指针”更改为“.status-error td”使其指向 tr 下面的 td,并且所有浏览器都可以正常工作。
最佳答案
奇怪..无法告诉你为什么会遇到这个问题,但也许尝试一下脉动效果插件? http://docs.jquery.com/UI/Effects/Pulsate
关于IE 中的 jQuery 淡入、淡出效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/353100/