animation 圆角
2018-09-13 本文已影响0人
neko233
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.box{
width: 500px;
height: 200px;
margin: 50px auto;
border: 2px solid black;
text-align: center;
}
.box div{
float: left;
width: 60px;
height: 120px;
margin-left: 33px;
margin-top: 40px;
border-radius: 30px;
}
.box .one{
background-color: red;
animation: change 1s ease infinite alternate both;
}
.box .two{
background-color: green;
animation: change 1s ease 100ms infinite alternate both;
}
.box .three{
background-color: yellow;
animation: change 1s ease 200ms infinite alternate both;
}
.box .four{
background-color: blue;
animation: change 1s ease 300ms infinite alternate both;
}
.box .five{
background-color: pink;
animation: change 1s ease 400ms infinite alternate both;
}
@keyframes change{
from{
transform: scaleY(1);
}
to{
transform: scaleY(0.4);
}
}
</style>
</head>
<body>
<div class="box">
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
<div class="four"></div>
<div class="five"></div>
<p>loading……</p>
</div>
</body>
</html>
