css3 animation 实现环形路径平移动画
2016-11-14 08:59
676 查看
注意 @keyframes to/from 的学习
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <style> /* 顺时针自转 */ @keyframes spin { to { transform: rotate(1turn); } } /* 逆时针自转 */ @keyframes spin-reverse { from { transform: rotate(1turn); } } /* 这是一坨自暴自弃的样式 */ .basic{ border:3px solid orange; height: 150px; width:150px; border-radius:50%; margin:50px; } /* 顺时针自转,同时该元素下所有的子元素也会一起旋转起来 */ .avatar{ /* linear : 从头到尾速度是相同的; infinite:无限轮播 */ animation: spin 10s infinite linear; } /* 逆时针旋转“自转”,与“公转”导致的旋转相抵消。形成一种不动的错觉 */ .avatar > img { animation:spin-reverse 10s infinite linear; } </style> <div class="basic avatar"> <img src="github.png" alt=""> </div> </body> </html>
相关文章推荐
- CSS3动画animation实现漂浮的云
- css3动画显示实现animation属性
- CSS3 Animation实现加载动画
- CSS3动画animation实现云彩向左滚动
- CSS3 animation动画实现轮播图效果
- 模仿百度首页“元宵节汤圆”动图,并实现360°不停旋转(CSS3的animation动画效果)
- iOS利用UIBezierPath + CAAnimation实现路径动画效果
- CSS3 动画实现 animation 和 transition 比较
- css3 | 中的animation/@keyframes xz动画效果-如何使用纯css实现动画效果? 用法:animation:xz 3s 2 4s alternate; 参数:animati
- 利用CSS3实现平移动画效果示例代码
- 利用requestAnimationFrame和Tween算法实现兼容所有浏览器的运动动画,直接秒杀Css3动画
- CAKeyframeAnimation实现控件按照手势绘制的路径做动画
- 验证requestAnimationFrame、CSS3以及setinterval实现动画效果的优劣
- css3 使用animation实现动画效果
- create-keyframe-animation-js实现css3动画
- css3 animation 实现帧动画
- Android中补间动画1----Animation的基本使用代码实现(平移,缩放,渐变,旋转)
- 用CSS3的animation轻松实现背景动画:漂浮的云
- CSS3 animation实现点点点loading动画
- ios-day18-09(使用CAKeyframeAnimation实现对UIView在多个位置之间平移、沿着某一条路径平移)