2018-11-27动画测试
2018-11-27 本文已影响0人
回忆在美也是曾经
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>作业</title>
<style type="text/css">
.box{
width: 700px;
height: 300px;
margin:0 auto;
border-style: solid;
}
.b1{
width: 40px;
height: 70px;
background-color: #ff0000;
margin: 70px 50px;
float: left;
border-radius: 10px;
animation: moving 200ms ease 500ms infinite alternate both;
}
.b2{
width: 40px;
height: 70px;
background-color: #008110;
margin: 70px 50px;
float: left;
border-radius: 10px;
animation: moving 400ms ease 200ms infinite alternate both;
}
.b3{
width: 40px;
height: 70px;
background-color: #FFC1CB;
margin: 70px 50px;
float: left;
border-radius: 10px;
animation: moving 300ms ease 300ms infinite alternate both;
}
.b4{
width: 40px;
height: 70px;
background-color: #ADFF2E;
margin: 70px 50px;
float: left;
border-radius: 10px;
animation: moving 200ms ease 400ms infinite alternate both;
}
.b5{
width: 40px;
height: 70px;
background-color: #00FFFF;
margin: 70px 50px;
float: left;
border-radius: 10px;
animation: moving 200ms ease 500ms infinite alternate both;
}
@keyframes moving {
from{
transform: scaleY(2);
}
to{
transform: scaleY(1);
}
}
.box p{
display: inline-block;
position: absolute;
top: 270px;
left: 900px;
}
</style>
</head>
<body>
<div class="box">
<div class="b1"></div>
<div class="b2"></div>
<div class="b3"></div>
<div class="b4"></div>
<div class="b5"></div>
<p>loading......</p>
</div>
</body>
</html>