效果:点击按钮,正方体从左left=0移动到left=800,高度不断增加
到达800后缩小返回
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style type="text/css">
.wrapper{
width: 500px;
height: 300px;
margin: 100px auto;
}
ul{
list-style: none;
}
#div1{
width: 200px;
height: 200px;
position: relative;
left: 0;
background-color: cornflowerblue;
}
</style>
<script src="jq