CSS代码例如以下:

/* Custom Stylesheet */
body, html {
margin: 0;
-webkit-font-smoothing: antialiased;
background: #68ABAD;
text-align: center;
} /* DEMO 1 */
.loader1 {
margin: 0 auto;
height: 20px;
width: 20px;
position:relative;
-webkit-animation:spin 1.5s linear infinite;
-moz-animation:spin 1.5s linear infinite;
}
.loader1 i{
height: 20px;
width: 20px;
border-radius: 25px;
display: block;
position:absolute;
}
.loader1 i:before, .loader1 i:after{
content:'';
display:block;
position:absolute;
height:inherit;
width:inherit;
border-radius: inherit;
}
.loader1 i:first-child:before {
background:rgba(52, 149, 221, 0.9);
-webkit-animation:rotate-top-left 1.5s linear infinite;
-moz-animation:rotate-top-left 1.5s linear infinite;
}
.loader1 i:first-child:after {
background:rgba(225, 73, 44, 0.9);
-webkit-animation:rotate-top-right 1.5s linear infinite;
-moz-animation:rotate-top-right 1.5s linear infinite;
}
.loader1 i:last-child:before {
background:rgba(249, 206, 43, 0.9);
-webkit-animation:rotate-bottom-left 1.5s linear infinite;
-moz-animation:rotate-bottom-left 1.5s linear infinite;
}
.loader1 i:last-child:after {
background:rgba(0, 153, 117, 0.9);
-webkit-animation:rotate-bottom-right 1.5s linear infinite;
-moz-animation:rotate-bottom-right 1.5s linear infinite;
}
@-webkit-keyframes spin{
0%{
-webkit-transform:rotate(0deg);
}
50%{
-webkit-transform:rotate(-180deg);
}
100%{
-webkit-transform:rotate(-360deg);
}
}
@-webkit-keyframes rotate-top-right{
0%{
-webkit-transform:rotate(0deg);
}
50%{
-webkit-transform:rotate(-180deg);
-webkit-transform-origin: 20% 20%;
}
100%{
-webkit-transform:rotate(-360deg);
}
}
@-webkit-keyframes rotate-top-left{
0%{
-webkit-transform:rotate(0deg);
}
50%{
-webkit-transform:rotate(180deg);
-webkit-transform-origin: 80% 20%;
}
100%{
-webkit-transform:rotate(360deg);
}
}
@-webkit-keyframes rotate-bottom-right{
0%{
-webkit-transform:rotate(0deg);
}
50%{
-webkit-transform:rotate(-180deg);
-webkit-transform-origin: 80% 80%;
}
100%{
-webkit-transform:rotate(-360deg);
}
}
@-webkit-keyframes rotate-bottom-left{
0%{
-webkit-transform:rotate(0deg);
}
50%{
-webkit-transform:rotate(180deg);
-webkit-transform-origin: 20% 80%;
}
100%{
-webkit-transform:rotate(360deg);
}
} @-moz-keyframes spin{
0%{
-moz-transform:rotate(0deg);
}
50%{
-moz-transform:rotate(-180deg);
}
100%{
-moz-transform:rotate(-360deg);
}
}
@-moz-keyframes rotate-top-right{
0%{
-moz-transform:rotate(0deg);
}
50%{
-moz-transform:rotate(-180deg);
-moz-transform-origin: 20% 20%;
}
100%{
-moz-transform:rotate(-360deg);
}
}
@-moz-keyframes rotate-top-left{
0%{
-moz-transform:rotate(0deg);
}
50%{
-moz-transform:rotate(180deg);
-moz-transform-origin: 80% 20%;
}
100%{
-moz-transform:rotate(360deg);
}
}
@-moz-keyframes rotate-bottom-right{
0%{
-moz-transform:rotate(0deg);
}
50%{
-moz-transform:rotate(-180deg);
-moz-transform-origin: 80% 80%;
}
100%{
-moz-transform:rotate(-360deg);
}
}
@-moz-keyframes rotate-bottom-left{
0%{
-moz-transform:rotate(0deg);
}
50%{
-moz-transform:rotate(180deg);
-moz-transform-origin: 20% 80%;
}
100%{
-moz-transform:rotate(360deg);
}
} /* DEMO 2 */ .loader2 {
margin: 0 auto;
position:relative;
width: 100px;
height: 100px;
}
.loader2 i {
border-style:solid;
display:inline-block;
box-sizing:border-box;
-moz-box-sizing:border-box;
border-width:50px;
border-color:rgba(255,255,255,1);
border-radius: 50px;
-moz-animation:blink 1.5s infinite ease-in-out;
-webkit-animation:blink 1.5s infinite ease-in-out;
height: 100px;
width: 100px;
}
@-webkit-keyframes blink{
50%{
border-width:0;
border-color:rgba(255,255,255,0.5);
}
100%{
border-width:0;
border-color:rgba(255,255,255,0.5);
}
}
@-moz-keyframes blink{
50%{
border-width:0;
border-color:rgba(255,255,255,0.5);
}
100%{
border-width:0;
border-color:rgba(255,255,255,0.5);
}
} /* DEMO 3 */
.loader3 {
margin: 0 auto;
position:relative;
width: 50px;
height: 50px;
-webkit-animation:spin 4s infinite ease;
-moz-animation:spin 4s infinite ease;
}
.loader3 i {
border-style:solid;
display:inline-block;
box-sizing: border-box;
-moz-box-sizing: border-box;
border:2px dashed rgba(0,0,0,0.7);
border-radius: 50px;
-webkit-animation:scale 4s infinite linear;
-moz-animation:scale 4s infinite linear;
height: 50px;
width: 50px;
}
@-webkit-keyframes spin{
0%{
-webkit-transform:rotate(0deg);
}
25%{
-webkit-transform:rotate(90deg);
}
50%{
-webkit-transform:rotate(-90deg);
}
75%{
-webkit-transform:rotate(180deg);
}
100%{
-webkit-transform:rotate(-180deg);
}
}
@-webkit-keyframes scale{
0%{
-webkit-transform:scale(1);
}
25%{
-webkit-transform:scale(0.5);
}
50%{
-webkit-transform:scale(1);
}
75%{
-webkit-transform:scale(0.5);
}
100%{
-webkit-transform:scale(1);
}
}
@-moz-keyframes spin{
0%{
-moz-transform:rotate(0deg);
}
25%{
-moz-transform:rotate(90deg);
}
50%{
-moz-transform:rotate(-90deg);
}
75%{
-moz-transform:rotate(180deg);
}
100%{
-moz-transform:rotate(-180deg);
}
}
@-moz-keyframes scale{
0%{
-moz-transform:scale(1);
}
25%{
-moz-transform:scale(0.5);
}
50%{
-moz-transform:scale(1);
}
75%{
-moz-transform:scale(0.5);
}
100%{
-moz-transform:scale(1);
}
} /* DEMO 4 */
.loader4 {
margin: 0 auto;
position:relative;
text-align: center;
border-bottom: 70px solid rgba(255,255,255,0.5);
border-left: 10px solid transparent;
border-right: 10px solid transparent;
height: 0;
width: 20px
}
.loader4:before{
content:'';
top: -15px;
left: -28px;
display:block;
position:absolute;
height:70px;
width:70px;
border-radius: 50px;
border: 5px dashed rgba(255,255,255,0.5);
-webkit-animation:wind .25s linear infinite;
-moz-animation:wind .25s linear infinite;
}
.loader4 i{
height: 40px;
width: 5px;
margin-left: -1.5px;
display: inline-block;
position:absolute;
-webkit-animation:spin 1.5s linear infinite;
-moz-animation:spin 1.5s linear infinite;
}
.loader4 i:before, .loader4 i:after{
content:'';
display:block;
position:absolute;
height:inherit;
width:inherit;
border-radius: inherit;
background: white;
}
.loader4 i:first-child:before {
top: -53%;
-webkit-transform:rotate(-45deg);
-webkit-transform-origin: 100% 100%;
-moz-transform:rotate(-45deg);
-moz-transform-origin: 100% 100%;
}
.loader4 i:first-child:after {
top: -53%;
-webkit-transform-origin: 0 100%;
-webkit-transform:rotate(45deg);
-moz-transform-origin: 0 100%;
-moz-transform:rotate(45deg);
}
.loader4 i:last-child:before {
top: 45%;
-webkit-transform-origin: 100% 0;
-webkit-transform:rotate(-45deg);
-moz-transform-origin: 100% 0;
-moz-transform:rotate(-45deg);
}
.loader4 i:last-child:after {
-webkit-transform-origin: 0 0;
-webkit-transform: rotate(45deg);
-moz-transform-origin: 0 0;
-moz-transform: rotate(45deg);
top: 45%;
}
@-webkit-keyframes spin{
0%{
-webkit-transform:rotate(0deg);
}
50%{
-webkit-transform:rotate(-180deg);
}
100%{
-webkit-transform:rotate(-360deg);
}
}
@-webkit-keyframes wind{
100%{
-webkit-transform:scale(2);
border-width: 0;
}
}
@-moz-keyframes spin{
0%{
-moz-transform:rotate(0deg);
}
50%{
-moz-transform:rotate(-180deg);
}
100%{
-moz-transform:rotate(-360deg);
}
}
@-moz-keyframes wind{
100%{
-moz-transform:scale(2);
border-width: 0;
}
} /* DEMO 5 */
.solar {
margin: 250px auto 350px;
height: 50px;
width: 50px;
background: orange;
border-radius: 25px;
position:relative;
-webkit-animation:glow 1.5s linear infinite;
-moz-animation:glow 1.5s linear infinite;
}
.solar i{
border-radius: 250px;
display:block;
position:absolute;
border: 1px solid rgba(255,255,255, 0.15);
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-transform-origin: 50% 50%;
-moz-transform-origin: 50% 50%;
}
.solar i:before {
content:'';
border-radius: 25px;
background: black;
display: block;
position:absolute;
top: -5px;
right: 45%;
}
.solar i.mercury {
width: 80px;
height: 80px;
margin-left: -40px;
left: 50%;
top: 50%;
margin-top: -40px;
-webkit-animation:orbit .5s linear infinite;
-moz-animation:orbit .5s linear infinite;
}
.solar i.mercury:before {
background: #6F5F5F;
height: 7px;
width: 7px;
}
.solar i.venus {
width: 110px;
height: 110px;
margin-left: -55px;
left: 50%;
top: 50%;
margin-top: -55px;
-webkit-animation:orbit 1s linear infinite;
-moz-animation:orbit 1s linear infinite;
}
.solar i.venus:before {
background: #E7A71F;
height: 10px;
width: 10px;
}
.solar i.earth {
width: 140px;
height: 140px;
margin-left: -70px;
left: 50%;
top: 50%;
margin-top: -70px;
-webkit-animation:orbit 1.5s linear infinite;
-moz-animation:orbit 1.5s linear infinite;
}
.solar i.earth:before {
background: #63BEE2;
height: 10px;
width: 10px;
}
.solar i.mars {
width: 170px;
height: 170px;
margin-left: -85px;
left: 50%;
top: 50%;
margin-top: -85px;
-webkit-animation:orbit 2s linear infinite;
-moz-animation:orbit 2s linear infinite;
}
.solar i.mars:before {
background: red;
height: 10px;
width: 10px;
}
.solar i.belt {
box-sizing: border-box;
-moz-box-sizing: border-box;
border-width: 25px;
width: 240px;
height: 240px;
margin-left: -120px;
border-color: rgba(36, 35, 35, 0.21);
left: 50%;
top: 50%;
margin-top: -120px;
}
.solar i.jupiter {
width: 260px;
height: 260px;
margin-left: -130px;
left: 50%;
top: 50%;
margin-top: -130px;
-webkit-animation:orbit 2.5s linear infinite;
-moz-animation:orbit 2.5s linear infinite;
}
.solar i.jupiter:before {
background: #CF9B2B;
top: -15px;
height: 30px;
width: 30px;
}
.solar i.saturn {
width: 320px;
height: 320px;
margin-left: -160px;
left: 50%;
top: 50%;
margin-top: -160px;
-webkit-animation:orbit 3s linear infinite;
-moz-animation:orbit 3s linear infinite;
}
.solar i.saturn:before {
background: #CF7A2B;
top: -10px;
height: 20px;
width: 20px;
}
.solar i.saturn:after {
background: #fff;
width: 30px;
height: 1px;
content: '';
position: absolute;
display: block;
background: #FFF;
width: 30px;
height: 1px;
content: '';
right: 43.5%;
-webkit-transform:rotate(20deg);
-moz-transform:rotate(20deg);
}
.solar i.uranus {
width: 360px;
height: 360px;
margin-left: -180px;
left: 50%;
top: 50%;
margin-top: -180px;
-webkit-animation:orbit 3.5s linear infinite;
-moz-animation:orbit 3.5s linear infinite;
}
.solar i.uranus:before {
background: #10C593;
top: -8px;
height: 15px;
width: 15px;
}
.solar i.neptune {
width: 400px;
height: 400px;
margin-left: -200px;
left: 50%;
top: 50%;
margin-top: -200px;
-webkit-animation:orbit 4s linear infinite;
-moz-animation:orbit 4s linear infinite;
}
.solar i.neptune:before {
background: #1470E4;
top: -8px;
height: 15px;
width: 15px;
}
@-webkit-keyframes orbit{
0%{
-webkit-transform:rotate(0deg);
}
50%{
-webkit-transform:rotate(-180deg);
}
100%{
-webkit-transform:rotate(-360deg);
}
}
@-webkit-keyframes glow{
0%{
box-shadow: none;
}
50%{
background: #FFEB00;
box-shadow: 0 0 20px orange;
}
100%{
box-shadow: none;
}
}
@-moz-keyframes orbit{
0%{
-moz-transform:rotate(0deg);
}
50%{
-moz-transform:rotate(-180deg);
}
100%{
-moz-transform:rotate(-360deg);
}
}
@-moz-keyframes glow{
0%{
box-shadow: none;
}
50%{
background: #FFEB00;
box-shadow: 0 0 20px orange;
}
100%{
box-shadow: none;
}
}

效果如图:看来博客不能引用jsfiddle

查看demo

分享一个纯css制作的动画化,在网页(手机)载入等的时候能够引用!的更多相关文章

  1. 一个纯CSS DIV天气动画图标【转扒的】

    <p> </p> <style><!-- /* SUNNY */ .sunny { -webkit-animation: sunny 15s linear i ...

  2. 如何使用纯 CSS 制作四子连珠游戏

    序言:你是否想过单纯使用 CSS 也可以制作一款游戏?甚至可以双人对决!这是一篇非常有趣的文章,作者详细讲解了使用纯 CSS 制作四子连珠游戏的思路以及使用奇淫巧技解决困难问题的方法.因为案例本身比较 ...

  3. 8个纯CSS3制作的动画应用及源码

    对于一个复杂的图形或者动画来说,之前我们的处理方式是图片叠加或者利用CSS+JavaScript的方法,然而随着CSS3标准的不断成熟,我们甚至完全可以利用CSS3来绘制一些图片和制作丰富的动画特效. ...

  4. 如何使用纯CSS制作特效导航条?

    先上张图,如何使用纯 CSS 制作如下效果? 在继续阅读下文之前,你可以先缓一缓.尝试思考一下上面的效果或者动手尝试一下,不借助 JS ,能否巧妙的实现上述效果. OK,继续.这个效果是我在业务开发的 ...

  5. 每日CSS_纯CSS制作进度条

    每日CSS_纯CSS制作进度条 2020_12_26 源码 1. 代码解析 1.1 html 代码解析 设置整个容器 <div class="container"> . ...

  6. 纯CSS制作水平垂直居中“十字架”

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  7. No.5 - 纯 CSS 制作绕中轴旋转的立方体

    body{ background-color: #000; margin:; padding:; } main{ perspective: 800px; } .cube{ transform-styl ...

  8. 纯CSS制作空心三角形和实心三角形及其实现原理

    纯CSS制作空心三角形和实心三角形及其实现原理 在一次项目中需要使用到空心三角形,我瞬间懵逼了.查阅了一些资料加上自己的分析思考,终于是达到了效果,个人感觉制作三角形是使用频率很高的,因此记录下来,供 ...

  9. 纯CSS制作三角(转)

    原原文地址:http://www.w3cplus.com/code/303.html 原文地址:http://blog.csdn.net/dyllove98/article/details/89670 ...

随机推荐

  1. 路由器wan口ip地址显示0.0.0.0怎么办

    http://m.xuexila.com/luyouqi/671049.html 这个网络时代里面我们最常用来连接网络的设备就是路由器了,现在的社会不管是工作还是生活几乎都离不开网络了,同时我们也要学 ...

  2. Hibernate5.x版本HQL限定查询 Legacy-style query parameters (`?`) are no longer supported

    在此版本的限定查询和4.0版本的限定查询: 如果查询语句是: String hql = "select u from User u where u.gender = ?"; 会出现 ...

  3. QT5:第二章 布局排版控件

    一.简介 在QT组件面板中有Layouts和Spacers两个组件面板 注意:布局排版控件不显示 1.Layouts(布局) Vertical Layout:垂直方向布局,组件自动在垂直方向上分布 H ...

  4. ProxyFactory

    Spring定义了org.springframework.aop.framework.AopProxy接口,并提供了两个final类型的实现类. AopProxy类结构:

  5. 第二章:systemverilog声明的位置

    1.package 定义及从package中导入定义(***) verilog中,对于变量.线网.task.function的声明必须在module和endmodule之间.如果task被多个modu ...

  6. Servlet+JSP教程之:第一个Web程序

    我们知道当浏览器发送请求给服务器后,服务器会调用并执行对应的逻辑代码进行请求处理.逻辑代 码是由程序员自己编写然后放进服务器进行运行,其实就是Servlet程序. 第一个Web程序: 开发工具: My ...

  7. 剑指Offer(书):重建二叉树

    题目:输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树.假设输入的前序遍历和中序遍历的结果中都不含重复的数字.例如输入前序遍历序列{1,2,4,7,3,5,6,8}和中序遍历序列{4,7,2, ...

  8. 【02】SASS与SCSS

    SASS语法 SASS语法也称之为SASS的缩进语法,其目的是担供一个更简洁的语法.对于一些人来说,更多的是基于于CSS的美学吸引力,用SASS来代替SCSS语法. SASS语法和CSS语法不一样,他 ...

  9. Fiddler抓包-会话框添加查看get与post请求类型选项

    from:https://www.cnblogs.com/yoyoketang/p/7061990.html 在使用fiddler抓包的时候,查看请求类型get和post每次只有点开该请求,在Insp ...

  10. 前端传list,springmvc接收list的方法

    handler: function() { var baseCustomerForm = me.getAddBaseCustomerForm().getForm(); var linkStore = ...