h5放大缩小循环动画记录
作者:
小黑猿 | 来源:发表于
2019-05-23 12:41 被阅读0次

animation.gif
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
@keyframes opacity-alt2{
0% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
50%{
-webkit-transform: scale(1.2);
-moz-transform: scale(1.2);
-ms-transform: scale(1.2);
-o-transform: scale(1.2);
transform: scale(1.2);
}
100%{
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
}
.demo{
width: 100px;
height: 100px;
margin:0 auto;
margin-top: 200px;
background: red;
animation:opacity-alt2 2s infinite;
-moz-animation:opacity-alt2 2s infinite; /* Firefox */
-webkit-animation:opacity-alt2 2s infinite; /* Safari and Chrome */
-o-animation:opacity-alt2 2s infinite; /* Opera */
}
</style>
</head>
<body>
<div class="demo">
</div>
</body>
</html>
本文标题:h5放大缩小循环动画记录
本文链接:https://www.haomeiwen.com/subject/utuvzqtx.html
网友评论