首页 > 其他 > 详细

如何让让图片一直做动画?

时间:2019-11-12 11:08:17      阅读:81      评论:0      收藏:0      [点我收藏+]

1.360度一直旋转动画

 

<img  class="rotate"  src="../circle.png"/>
.rotate {
    transform: rotate(360deg);
    animation: rotation 3s linear infinite;
    -moz-animation: rotation 3s linear infinite;
    -webkit-animation: rotation 3s linear infinite;
    -o-animation: rotation 3s linear infinite;
}
@keyframes rotation {
    from {-webkit-transform: rotate(0deg);
}
to {
    -webkit-transform: rotate(360deg);
}
}

2.放大动画

<img  class="ballon"  src="../circle.png"/>
@keyframes scaleDraw { 
    0%{
        transform: scale(1);
        opacity:1;  
    }
    100% {
        transform: scale(1.3); 
        opacity:0.4;
    }
    
}
.ballon{
    animation-name: scaleDraw; 
    animation-timing-function: ease-in-out; 
    animation-iteration-count: infinite;  
    animation-duration: 2s; 
        
}

如何让让图片一直做动画?

原文:https://www.cnblogs.com/wx2019/p/11840128.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!