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 ...
随机推荐
- 微信开发学习日记(七):开源微商城wemall
最近嘛,不是在调研PHP和微信的行情么. 发现,微商城是非常火爆的一个领域,既然业务有搞头,那么技术这一块也有很多选择. 网上发现了wemall这个开源的PHP实现的微商城. 下载了开源版本,PHP后 ...
- [React] Public Class Fields with React Components
Public Class Fields allow you to add instance properties to the class definition with the assignment ...
- [Postgres] Update and Delete records in Postgres
Delete example: DELETE FROM movies ; Update example: UPDATE movies ;
- SpringMVC3,使用RequestMappint的Param参数,实现一个url绑定多个方法
SpringMVC中,默认不能把多个相同的url绑定到同一个方法.如果需要绑定,需要增加param参数,而且值要不同. 我自己没有这个需求,或者就是有需求,我也想到的是使用不同的url. 项目中有少部 ...
- Android Activity 悬浮 半透明边框
1.首先来创建一个Activity,在Activity的OnCreate函数里面我们设置它为全屏,然后设置Activity的宽高为全屏*0.9,然后设置背景图片为半透明的 .9 图片 .这样就已经是非 ...
- KVO的使用(1)
1.在某个类中添加下面方法: -(void)viewWillAppear:(BOOL)animated{ [[NSNotificationCenter defaultCenter] addObserv ...
- zookeeper 客户端操作
代码 /** * 创建zk客户端 * 实现循环监听的两个必要条件:1.程序不能结束2.递归调用监听器 * @author tele * */ public class Demo { ; //多个节点用 ...
- selenium 爬取空间说说
package cn.hb.util; import java.io.File; import java.io.FileWriter; import java.io.IOException; impo ...
- 【38.24%】【codeforces 621E】 Wet Shark and Blocks
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...
- vuex与vue-router学习方案
1.vuex,官方vuex2.0的文档写得太简略了,先1.0的文档,研究1.0分支的counter例子.1.0文档只需看核心概念和API参考文档.2.0的用法先不管,需要的时候再说,先把1.0高熟练. ...