css實現盒子重複放大縮小
阿新 • • 發佈:2021-01-06
技術標籤:CSS
效果
html
<div class=box1></div>
css
.box1{ width:100px; height:100px; margin:auto; animation:myMove .5s infinite alternate linear; -moz-animation:myMove .5s infinite alternate linear; -webkit-animation:myMove .5s infinite alternate linear; -o-animation:myMove .5s infinite alternate linear; } @keyframes myMove{ 0%{transform:scale(.7) 100%{transform:scale(1) } @-moz-keyframes myMove{ 0%{transform:scale(.7) 100%{transform:scale(1) } @-webkit-keyframes myMove{ 0%{transform:scale(.7) 100%{transform:scale(1) } @-o-keyframes myMove{ 0%{transform:scale(.7) 100%{transform:scale(1) }