css3如何让div一直循环自转圈,附带:网络请求通知图片一直在转圈实例
css3如何让div一直循环自转圈
代码如下:
div{
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 1s;
-moz-transition-property: -moz-transform;
-moz-transition-duration: 1s;
-webkit-animation: rotate 3s linear infinite;
-moz-animation: rotate 3s linear infinite;
-o-animation: rotate 3s linear infinite;
animation: rotate 3s linear infinite;}
@-webkit-keyframes rotate{from{-webkit-transform: rotate(0deg)}
to{-webkit-transform: rotate(360deg)}
}
@-moz-keyframes rotate{from{-moz-transform: rotate(0deg)}
to{-moz-transform: rotate(359deg)}
}
@-o-keyframes rotate{from{-o-transform: rotate(0deg)}
to{-o-transform: rotate(359deg)}
}
@keyframes rotate{from{transform: rotate(0deg)}
to{transform: rotate(359deg)}
}
效果如下:

以上效果图,是一个《网络请求通知》实例,一直在转圈的实例,实例代码如下:
《网络请求通知图片一直在转圈实例》
CSS:
/*网络请求通知*/
.web_request{
position: fixed;
z-index:;
top:0px;
left:0px;
width:100%;
height:100%;
}
.web_request_body{
width:40px;
height:40px;
margin:0 auto;
margin-top:10%;
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 1s;
-moz-transition-property: -moz-transform;
-moz-transition-duration: 1s;
-webkit-animation: rotate 1.5s linear infinite;
-moz-animation: rotate 1.5s linear infinite;
-o-animation: rotate 1.5s linear infinite;
animation: rotate 1.5s linear infinite;
}
@-webkit-keyframes rotate{from{-webkit-transform: rotate(0deg)}
to{-webkit-transform: rotate(360deg)}
}
@-moz-keyframes rotate{from{-moz-transform: rotate(0deg)}
to{-moz-transform: rotate(359deg)}
}
@-o-keyframes rotate{from{-o-transform: rotate(0deg)}
to{-o-transform: rotate(359deg)}
}
@keyframes rotate{from{transform: rotate(0deg)}
to{transform: rotate(359deg)}
}
.web_request_body_background{
position: absolute;
width:40px;
height:40px;
background:#000;
opacity:0.2;
border-radius:50%;
}
.web_request_body_icon{
position: absolute;
}
.web_request_body_icon img{
margin-top:5px;
margin-left:5px;
width:30px;
height:30px;
}
HTML:
<!--网络请求通知-->
<div class="web_request">
<div class="web_request_body">
<div class="web_request_body_background"></div>
<div class="web_request_body_icon"><img src="/cai_img/fot_bz.png" /></div>
</div>
</div>
css3如何让div一直循环自转圈,附带:网络请求通知图片一直在转圈实例的更多相关文章
- CSS3圆圈动画放大缩小循环动画效果
代码如下: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" c ...
- CSS3 实现六边形Div图片展示效果
原文:CSS3 实现六边形Div图片展示效果 效果图: 实现原理: 这个效果的主要css样式有: 1.>transform: rotate(120deg); 图片旋转 2.>overflo ...
- css3 transform 旋转div
css3 transform 旋转div 学习了:http://www.w3school.com.cn/cssref/pr_transform.asp
- 【转】Android循环滚动广告条的完美实现,封装方便,平滑过渡,从网络加载图片,点击广告进入对应网址
Android循环滚动广告条的完美实现,封装方便,平滑过渡,从网络加载图片,点击广告进入对应网址 关注finddreams,一起分享,一起进步: http://blog.csdn.net/finddr ...
- 循环神经网络与LSTM网络
循环神经网络与LSTM网络 循环神经网络RNN 循环神经网络广泛地应用在序列数据上面,如自然语言,语音和其他的序列数据上.序列数据是有很强的次序关系,比如自然语言.通过深度学习关于序列数据的算法要比两 ...
- wait()方法写在while循环中可以在线程接到通知后再一次判断条件
wait()方法写在while循环中可以在线程接到通知后再一次判断条件 synchronized public String pop() { String returnValue = "&q ...
- css3实现一个div设置多张背景图片及background-image属性
CSS3/CSS1 background-image 属性 语法: background-image:<bg-image> [ , <bg-image> ]* <bg-i ...
- css3实现左右div高度自适应且内容居中对齐
主要运用了css3的弹层布局,直接上代码: 效果:左边盒子宽度固定.内容居中对齐.与右侧盒子高度相等,右侧自动缩放 html: <div class="main"> & ...
- 用jquery或js实现三个div自动循环轮播
//3个div的统一class = 'div' var index =0; //3秒轮播一次 var timer = setInterval(function(){ index = (inde ...
随机推荐
- VBA Code for Word Navigation Pane 【failed】 view-showheading-method-word
https://msdn.microsoft.com/VBA/Word-VBA/articles/view-showheading-method-word View.ShowHeading Metho ...
- php自带加密解密函数
php自带加密解密函数 一.总结 一句话总结:可逆和不可逆函数. 二.php自带加密解密函数 1.不可逆的加密函数为:md5().crypt() md5() 用来计算 MD5 哈稀.语法为:strin ...
- 【t030】数字构造
Time Limit: 3 second Memory Limit: 256 MB [问题描述] 有这么一个游戏: 写出一个1-N的排列a[i],然后每次将相邻两个数相加,构成新的序列,再对新序列进行 ...
- 【codeforces 768C】Jon Snow and his Favourite Number
[题目链接]:http://codeforces.com/contest/768/problem/C [题意] 给你n个数字; 让你每次把这n个数字排序; 然后对奇数位的数字进行异或操作,然后对新生成 ...
- iOS 利用FZEasyFile本地保存 和 常规保存
1.常规保存(较麻烦) NSFileManager *fileManager = [NSFileManager defaultManager]; //获取document路径,括号中属性为当前应用程序 ...
- GANs(生成对抗网络)初步
Image Completion with Deep Learning in TensorFlow 1. 基本思路 首先定义一个简单的.常见的概率分布,将其表示为 pz,不妨将其作为 [-1, 1] ...
- CSS布局--左侧自适应母元素高度
平常项目中经常会遇到有左侧导航菜单的高度不固定,需要与母元素或右侧元素等高的情况,以前就自以为是的使用js来设置,不仅不方便还会出现各种bug,后来就突然想到了一个好方法.有可能这方法已经被其他人用烂 ...
- Canvas,Matrix的变换顺序
Canvas的几何变换是倒序的,Matrix是正序. 比如先平移在旋转: canvas.rotate(); canvas.translate(); //translate先执行,rotate后执行 M ...
- navigator 页面链接
页面链接. 属性名 类型 默认值 说明 url String 应用内的跳转链接 redirect Boolean false 是否关闭当前页面 hover-class String navigat ...
- MATLAB Toolbox Path Cache is out of date and is not being used的解决
作者:朱金灿 来源:http://blog.csdn.net/clever101 使用mcc编译MATLAB\R2009a\extern\examples\compiler目录下的hello.m,编译 ...