2019-04-02 动画作业

<!DOCTYPE html>

<head>

<title>loading</title>

.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;

}

}

</style>

</head>

<body>

</div>

</div>

</div>

</div>

</div>

</div>

</body>

</html>

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容