jQuery插件来动画颜色从一个类到另一个类 [英] jQuery plugin to animate colors from one class to another
本文介绍了jQuery插件来动画颜色从一个类到另一个类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有很多jQuery颜色插件。
然而,我找不到一个动画css类声明之间的动画。
There are a lot of jQuery color plugins. However I couldn't find the one to animate between css class declarations.
例如从 .class1
到 .class2
:
.class1 { background-color: #000000 }
.class2 { background-color: #000088 }
这是可能吗?
推荐答案
jQuery animate()
命令已允许您为颜色转换设置动画。
The jQuery animate()
command already allows you to animate colour transitions.
以下是更出色的演示
EDIT:
要获得与CSS类相同的效果,还有
To get the same effect with CSS classes, there is
-
jQuery UI的
switchClass(add,remove,duration)
Igor Vieira的 animateToClass plugin
Igor Vieira's animateToClass plugin
James Padolsey的< a href =http://james.padolsey.com/demos/animateToSelector/ =nofollow noreferrer> animateToSelector plugin
James Padolsey's animateToSelector plugin
这篇关于jQuery插件来动画颜色从一个类到另一个类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文