首页 > Web开发 > 详细

css3 动画

时间:2019-11-02 15:49:26      阅读:80      评论:0      收藏:0      [点我收藏+]

<img src="" />

添加css

img{ width:400px;height:auto;    animation: heart 0.5s infinite;  }

/*animation:动画名称  消耗时间  运动曲线  开始时间  播放次数  是否添加反方向*/

1.变化大小

@keyframes heart{  

  0%{transform:scale(1);}

  50%{transform:scale(1.2);}

  100%{transform:scale(1);}

}

2.移动/颜色变化

@keyframes move{

  from{left:0;background:red;}

  to{left:1000px;background-color:yellow;}

}

3.旋转

@keyframes rotate{

  from{transform:rotate(0deg);}

  to{transform:rotate(360deg);}

}

css3 动画

原文:https://www.cnblogs.com/Tianjieqiangzhelingfeng/p/11782360.html

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