标签:
400
)swing
)drop
、explode、fade
、fold、highlight、puff
、pulsate、scale
、shake
、slide
<script>
$( document ).click(function() {
$( "#toggle" ).toggle( "blind" );
});
</script>
<script>
$( document ).click(function() {
$( "#toggle" ).toggle( "bounce", { times: 3 }, "slow" );
});
</script>
<script>
$( document ).click(function() {
$( "#toggle" ).toggle( "clip" );
});
</script>
<script>
$( "#toggle" ).click(function() {
$( "#elem" ).animate({
color: "green",
backgroundColor: "rgb( 20, 20, 20 )"
});
});
</script>
<script>
$( document ).click(function() {
$( "div" ).effect( "bounce", "slow" );
});
</script>
jQuery UI特效内核使用rgb()
, rgba()
,16进制值,甚至颜色名称比如"aqua"
给颜色增加了动画新特性。只需要包含 jQuery UI特效内核文件和.animate()
就可以获得对各种颜色的支持。
支持以下属性:
backgroundColor
borderBottomColor
borderLeftColor
borderRightColor
borderTopColor
color
columnRuleColor
outlineColor
textDecorationColor
textEmphasisColor
<script>
$( "#toggle" ).click(function() {
$( "#elem" ).animate({
color: "green",
backgroundColor: "rgb( 20, 20, 20 )"
});
});
</script>
<script>
$( "button" ).click(function() {
$( "div" ).hide( "drop", { direction: "down" }, "slow" );
});
<script>
$( "div" ).click(function() {
$( this ).removeClass( "big-blue", 1000, "easeInBack" );
});
<script>
$( "div" ).click(function() {
$( this ).toggleClass( "big-blue", 1000, "easeOutSine" );
});
</script>
标签:
原文地址:http://www.cnblogs.com/tytianlan/p/5630250.html