波纹动画制作

陌路散爱 提交于 2020-03-29 17:14:46

H5的动画效果,实例代码如下

 

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>动画</title>
<style>
*{padding: 0;margin: 0}
em{font-style: normal;}
@-webkit-keyframes newsBtn{
0%{
-webkit-transform:scale(0);
opacity: 0.1;
}
100%{
-webkit-transform:scale(1.5);
opacity: 1;
}
}
.box{width: 100%;margin: 0 auto;}
.warm{width: 78px;height: 78px;margin: 0 auto;}
.warm em{width: 78px;height: 78px;display: block;background: rgba(189,0,0,0.6);text-align: center;line-height: 78px;border-radius: 39px;color: #fff;position: absolute;top:0;left: 0;z-index: 2}
.warm span{width: 78px;height: 78px;display: block;background: rgba(189,0,0,0.3);position: absolute;top: 0;left: 0;border-radius: 39px;opacity: 0.1; -webkit-transform: scale(0);}
.warm span:nth-of-type(1){animation:newsBtn 2s infinite alternate;}
.warm span:nth-of-type(2){animation:newsBtn 2s .5s infinite alternate;}
.warm span:nth-of-type(3){animation:newsBtn 2s 1s infinite alternate;}
</style>
</head>
<body>
<div class="box">
<div class="warm">
<em>精彩活动</em>
<span></span>
<span></span>
<span></span>
</div>

</div>


</body>
</html>

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!