用用C3中的animation和transform写的一个模仿加载的时动画效果!
不多说直接上代码;
html标签部分
用C3中的animation和transform写的一个模仿加载的时动画效果
css部分
.demo{
width:200px;height:30px;
margin:100px auto;
}
.demo div{
float:left;
width:5px;
height:30px;
margin-left:5px;
}
@-webkit-keyframes fluctuation{
20%{
transform:scaleY(0.5);
}
0%,40%,70%,100%{
transform: scaleY(1);
}
}
.demo div:nth-of-type(1){
background:red;
animation: fluctuation 1s 0s ease-out infinite;
}
.demo div:nth-of-type(2){
background:yellow;
animation: fluctuation 1s 0.9s ease infinite;
}
.demo div:nth-of-type(3){
background:blue;
ani