我从http://codepen.io/bennettfeely/pen/DAbuf离线复制了代码,但我的动画与笔中的动画有所不同?之后我将原始笔中的代码复制到我的笔中,但我仍然得到了不同的动画?怎么回事?
这是代码
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.2.2/velocity.min.js"></script>
<body>
<figure>
<button>Recommend</button>
<div class="shadow"></div>
</figure>
<script>
$("button").mousedown(function(){
$(this).html("Recommended").velocity({
backgroundColorRed : "0",
translateY: "-1.5rem",
rotateZ: "-10deg"
}, 100, "easeOutBounce").velocity({
rotateZ: "8deg",
}, 150).velocity({
translateY: "0",
rotateZ: "0"
}, 600, "easeOutBounce");
$("+ .shadow", this).velocity({
scale: "1.3",
opacity: "1"
}, 150).velocity("reverse", 600, "easeOutBounce");
});
</script>
即使我用anyfh或任何meningless值替换easeOutBounce,我也会得到相同的动画?
$("+ .shadow", this).velocity({
scale: "1.3",
opacity: "1"
}, 150).velocity("reverse", 600, "anyfh");