2019-04-02 动画作业

loading

.box{

width: 620px;

height: 400px;

border: 3px solid #000;

margin: 0 auto;

}

.red,.green,.pink,.purple,.blue{

width: 100px;

height: 150px;

background-color: red;

float: left;

margin-left: 20px;

margin-top: 110px;

transform: scaleY(0.5);

transition: all 1s ease;

animation: moving 0.7s ease 1s infinite alternate both;

}

.box:hover{

animation-play-state: running;

}

.green{

background-color: green;

transition: all 1s ease;

animation: moving 1s ease 1s infinite alternate both;

}

.pink{

background-color: pink;

transition: all 1s ease;

animation: moving 1.4s ease 1s infinite alternate both;

}

.purple{

background-color: purple;

transition: all 1s ease;

animation: moving 1.7s ease 1s infinite alternate both;

}

.blue{

background-color: skyblue;

transition: all 1s ease;

animation: moving 2s ease 1s infinite alternate both;

}

@keyframes moving{

from{

height: 150px;

}

to{

height: 50px;

}

}

你可能感兴趣的:(2019-04-02 动画作业)