码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2019-11-12 11:13:20      阅读:94      评论:0      收藏:0      [点我收藏+]

标签:strong   如何   web   bsp   led   orm   scale   for   nim   

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; 
        
}

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

标签:strong   如何   web   bsp   led   orm   scale   for   nim   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!