是有办法在一个jQuery事件添加CSS3动画例如:反正CSS3过渡动画添加到元素jQuery的事件
<style>
.box{
width:100px;
height:100px;
bakground-color:#000;
}
.animate{
width:0px;
-webkit-transition-property: width; -webkit-transition-duration: 500ms;
-moz-transition-property: width; -moz-transition-duration: 500ms;
}
<style>
<html>
<div class="box"></div>
<button>click me to animate</button>
$('button').click(function(){
$('.box').addClass('animate');
});
</html>
这不适合我,没有任何反应,当按钮被点击。 – mcbeav 2011-04-08 01:03:13
它在小提琴中工作,但我试图让它工作。看起来我只是在我的实际代码中丢失了一些东西。谢谢! – mcbeav 2011-04-08 01:08:14