JQuery中的animate,相当与css3中的animate,使用的特效比较好看,但相对单一,而且在params中的参数也相对比较少,
params参数有:
width, height, font, fontSize, border, borderWidth, margin, padding, letterSpacing, wordSpacing等寥寥的几个params,
animate的代码示例如下:
$(function(){
$("#ttb").on("click", function(){
$(this).animate({
height: "+=200px",
width: "200px",
left: "50px",
fontSize: "2em"
}, 800)
})
})