div {
position: relative;
width: 100px;
height: 100px;
margin-bottom: 20px;
}
<div class="first" style="background:#DC143C;">
</div>
<br>
<div class="second" style="background:#CD5C5C;">
</div>
<br>
<div class="third" style="background:#FF69B4;">
</div>
<br>
<div class="fourth" style="background:#FF7F50;">
</div>
<script>
$(document).ready(function(){
$("class").click(function(){
$(".first").animate({
left: '250px'
});
});
$(".third").mouseover(function(){
$(this).animate().css({
backgroundColor: '#FFF552'
});
})
$(".first").click(function(){
$(this).animate({
width: 300
})
});
});
</script>
我完成了这个应用程序,并使它在没有按钮的情况下工作。但是现在我需要让这四个物体同时移动。我不知道如何做到这一点。同时移动物体
你可以在任何事物上放置点击事件。但按钮有什么问题? – ceejayoz
你的意思是没有点击启动动画? –
''我怎样才能使这个应用程序没有按钮?“ - 用另外的东西替换'