CSS3-旋转齿轮
CSS3-旋转齿轮
通过 CSS3,我们能够创建动画,这可以在许多网页中取代动画图片、Flash 动画以及 JavaScript。
先来认识一下css3的animation

animation的简写animation: name duration timing-function delay iteration-count direction;
其次就是@keyframes

好了,接下来运用上述两个属性做一个可以旋转的齿轮
<style>
.img {
margin: 0 auto;
text-align: center;
width: 400px;
height: 400px;
padding: 0;
animation-name:myrotate;
animation-duration:3s;
animation-timing-function:linear;
animation-delay:0s;
animation-iteration-count:infinite;
animation-direction:normal;
animation-play-state:running;
-moz-animation-name:myrotate;
-moz-animation-duration:3s;
-moz-animation-timing-function:linear;
-moz-animation-delay:0s;
-moz-animation-iteration-count:infinite;
-moz-animation-direction:normal;
-moz-animation-play-state:running;
-webkit-animation-name:myrotate;
-webkit-animation-duration:3s;
-webkit-animation-timing-function:linear;
-webkit-animation-delay:0s;
-webkit-animation-iteration-count:infinite;
-webkit-animation-direction:normal;
-webkit-animation-play-state:running;
-o-animation-name:myrotate;
-o-animation-duration:3s;
-o-animation-timing-function:linear;
-o-animation-delay:0s;
-o-animation-iteration-count:infinite;
-o-animation-direction:normal;
-o-animation-play-state:running;
}
@keyframes myrotate {
from {transform: rotate(0deg);}
to {transform: rotate(360deg);}
}
@-moz-keyframes myrotate {
from {-moz-transform: rotate(0deg);}
to {-moz-transform: rotate(360deg);}
}
@-webkit-keyframes myrotate {
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(360deg);}
}
@-o-keyframes myrotate {
from {-o-transform: rotate(0deg);}
to {-o-transform: rotate(360deg);}
}
</style>
<div class="img">
<img src="chilun.png" alt="">
</div>
CSS3-旋转齿轮的更多相关文章
- css3旋转倾斜3d小动画
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- css3旋转小三角
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 可控制转速CSS3旋转风车特效
以前制作网页动画一般使用javascript,现在已经有越来越多动动画使用纯CSS实现,并且动画的控制也可以使用CSS3实现,因为CSS 3来了,CSS 3的动画功能确实强大.以下是一个纯CSS3制作 ...
- 源码分享-纯CSS3实现齿轮加载动画
纯CSS3实现齿轮加载动画是一款可以用来做Loading动画的CSS3特效代码. 有兴趣的朋友可以下载下来试试:http://www.huiyi8.com/sc/8398.html
- 诺基亚 920T - 我的非凡系列手机始终显示旋转齿轮而无响应,我该如何让手机停止显示旋转齿轮?
有时,在 OTA 更新 (或重置手机) 后,设备可能始终显示“旋转齿轮”而无响应. 如果“旋转齿轮”在屏幕上显示的时间超过 60 分钟,则需要执行恢复操作. 您可以尝试下面这些简单的解决方法: 按住电 ...
- CSS3 旋转 太阳系
参考https://www.tadywalsh.com/web/cascading-solar-system/ 首先 旋转有两种方式 一种是使用 transform-origin 另一种是tran ...
- css3旋转
首先创建一个容器如div,然后设置其相关的3d属性,主要是三个1.perspective 透视,值越小3D感越强,值越大视觉正常.2.perspective-origin,透视点一般居于容器的中心.3 ...
- CSS3 旋转代码备忘
.Aclose { -webkit-transition-property: all; -webkit-transition-duration: .3s; -moz-transition-proper ...
- CSS3旋转缩放移动倾斜等效果——transform
1.transform浏览器支持情况 也就是说目前不考虑老浏览器的话是不用加前缀的,感谢菜鸟教程:https://www.runoob.com/cssref/css3-pr-transform.htm ...
- css3旋转、过渡、动画属性
1.transform 该属性对元素进行旋转.缩放.移动和倾斜 translate元素从当前位置移动 rotate元素顺时针旋转 scale元素的尺寸增大或减小 skew元素翻转 2.transiti ...
随机推荐
- 【转】android权限列表
访问登记属性 android.permission.ACCESS_CHECKIN_PROPERTIES ,读取或写入登记check-in数据库属性表的权限 获取错略位置 android.permiss ...
- Hyperworks、Nastran、Abaqus与ansys的区别
hypermesh不过是前处理,radioos就是hm的求解器,也是非常强大的可以处理很多非线性问题,最重要的是hm的优化功能强大.比那几个好一些.abaqus适合非线性分析,尤其是接触分析.nast ...
- Good Luck in CET-4 Everybody!(博弈)
Good Luck in CET-4 Everybody! Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K ...
- UIView 中 frame, bounds, center 属性的关系
最近一直在学 iOS 开发,所以专门创建了这样一个类别,将自己学习中的一些问题整理,记录下来.由于自己是初学者,所以所写的文章非常基础,写这个类别一是为了给自己留下存 档,二是为了给和我有同样问题的初 ...
- git 使用笔记(三)-分支的使用
简单介绍 之前说过,每次修改之后,Git 并不是保存这些修改之后的差异变化,实际上就像一个照相机一样,将修改后的文件拍下作为文件快照,记录在一个微型的文件系统中.在 Git 中提交时,会保存一个提交对 ...
- HDU 4861 Couple doubi(找规律|费马定理)
Couple doubi Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit ...
- 2015.8.2 jdbc实现商品类的增删查改
在惠普济宁基地进行了两周sql和java的学习,学到很多东西 刚才实现了用jdbc访问数据库对数据库进行操作,是用eclipse写的,过几天移植到NetBeans上,个人还是比较习惯看图形化界面 前几 ...
- 将Oracle数据库导出为txt格式
将Oracle数据库导出为txt格式: 方法1: 对于Windows系统,可以采用以下方式: 选择控制面板-->管理工具-->数据源(ODBC),添加一个新的数据源(系统或用户DSN均可) ...
- SQL基础常用语法
一.基础 1.说明:创建数据库 CREATE DATABASE database-name 2.说明:删除数据库 DROP database dbname 3.说明:创建新表 create table ...
- 覆盖与重载与隐藏——SAP电面(3)
参考:http://man.chinaunix.net/develop/c&c++/c/c.htm#_Toc520634042 8.2.1 重载与覆盖 成员函数被重载的特征: (1)相同的范围 ...