<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>练习</title>
<style type="text/css">
.*{
margin: 0;
padding:0;
}
.a{
width: 300px;
height: 125px;
margin: 200px auto 0;
border: #000 solid 1px;
}
.a p{
text-align: center;
width: 300px;
}
.b{
width: 30px;
height: 70px;
float:left;
margin: 15px;
border-radius: 10px;
background-color: green;
animation:loading 500ms ease 0s infinite alternate;
}
.c{
width: 30px;
height: 70px;
float:left;
margin: 15px;
border-radius: 10px;
background-color: yellow;
animation:loading 500ms ease 0s infinite alternate;
}
.d{
width: 30px;
height: 70px;
float:left;
margin: 15px;
border-radius: 10px;
background-color: #ffccdd;
animation:loading 500ms ease 0s infinite alternate;
}
.e{
width: 30px;
height: 70px;
float:left;
margin: 15px;
border-radius: 10px;
background-color: red;
animation:loading 500ms ease 0s infinite alternate;
}
.f{
width: 30px;
height: 70px;
float:left;
margin: 15px;
border-radius: 10px;
background-color: blue;
animation:loading 500ms ease 0s infinite alternate;
}
@keyframes loading{
from{
transform: scaleY(1);
}
to{
transform: scaleY(0.5);
}
}
.g{
width: 300px;
height: 125px;
float: left;
line-height: 100px;
text-align: center;
position: absolute;
top: 50%;
margin-bottom: -96px;
}
</style>
</head>
<body>
<div class="a">
<div class="b"></div>
<div class="c"></div>
<div class="d"></div>
<div class="e"></div>
<div class="f"></div>
<p>loading...</p>
</div>
</body>
</html>