<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>动画</title>
<style type="text/css">
.box{
width: 800px;
height: 500px;
background-color: azure;
position: relative;
}
.box:hover{
}
@keyframes moving{
0%{
transform: scaleY(1);
}
50%{
transform: scaleY(0.5);
}
100%{
transform: scaleY(1);
}
}
.box1{
width: 50px;
height: 150px;
background-color: red;
animation: moving 1s ease 1s infinite;
position: absolute;
left: 100px;
top: 200px;
border-radius:20px;
}
.box2{
width: 50px;
height: 150px;
background-color: lawngreen;
animation: moving 1s ease 1.1s infinite;
position: absolute;
left: 200px;
top: 180px;
border-radius: 20px;
}
.box3{
width: 50px;
height: 150px;
background-color: deepskyblue;
animation: moving 1s ease 1.2s infinite;
position: absolute;
left: 300px;
top: 175px;
border-radius: 20px;
}
.box4{
width: 50px;
height: 150px;
background-color:hotpink;
animation: moving 1s ease 1.3s infinite;
position: absolute;
left: 400px;
top: 160px;
border-radius: 20px;
}
.box5{
width: 50px;
height: 150px;
background-color:gold;
animation: moving 1s ease 1.4s infinite;
position: absolute;
left: 500px;
top: 150px;
border-radius: 20px;
}
</style>
</head>
<body>
<div class="box"></div>
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
<div class="box4"></div>
<div class="box5"></div>
</body>
</html>
动画
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- DrawableAnimation 代表的动画默认是不播放的,必须在程序中启动动画播放才可以。播放 start...
- 使用最经典的一张图来介绍一下动画抽象类CAAnimation.同NSOperation一样,都是抽象类,并不具备封...
- aos.js是一款非常好的监听页面滚动动条而加载出动态效果的插件 wow.js和aos.js作用一样,但是wow....
- 1. 三种动画的区别 :http://www.cnblogs.com/ldq2016/p/5407061.html...