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. C++派生类继承父类修饰符

    公式: 继承成员对外的访问属性 = Max{继承方式,父类成员访问级别}: 1.如果子类从父类继承时使用的继承限定符是public,那么(1)父类的public成员成为子类的public成员,允许类以 ...

  2. 通俗理解 模糊自适应PID

    模糊自适应PID算法就是在经典的PID的基础上添加模糊控制规则库,建立这个库的目的就是算法能够自己来进行改变P.I.D的值. 就拿温度的上升过程控制来说,刚开始的时候,希望温度能够快速的升到终点温度, ...

  3. 使用Maven构建JavaEE项目

    学习要点 Maven简介 Maven构建项目 MyEclipse中Maven的使用 Maven简介 Maven作用 对第三方依赖库进行统一的版本管理 统一的目录结构,统一各平台各IDE目录 统一的软件 ...

  4. linux 查看分区UUID的两种方法

    1. sudo blkid /dev/loop0: TYPE="squashfs"/dev/loop1: TYPE="squashfs"/dev/loop2: ...

  5. SQL Server 删除表的默认值约束

    首先查出字段的默认值约束名称,然后根据默认值约束名称删除默认值约束 ) select @constraintName = b.name from syscolumns a,sysobjects b w ...

  6. WebGL 绘制Line的bug(三)

    之前铺垫了许多,今天可以来分享点纯干货了. 上一篇已经讲述了通过面模拟线条时候,每一个顶点的顶点数据包括:端点坐标.偏移量.前一个端点坐标.后一个端点坐标,当然如果我们通过索引的方式来绘制的话,还包括 ...

  7. Mysql 查询多个字段去重复

    今天需要统计信息,但是有过个重复的数据,需要去除,找了如下方法: SELECT *, COUNT(DISTINCT phone ) FROM apply_info GROUP BY phone

  8. for、while循环

    for循环 # for 循环后面可以对Iterable或者Iterator进行遍历 # "abc"和[1,2,3]为可迭代对象,range(4)为迭代器 for i in &quo ...

  9. python:零散记录

    1.rstrip()删除末尾指定字符串 例如:A = '1,2,3,4,5,' B = A.rstrip(',') B = '1,2,3,4,5' 2.isdigit()方法 Python isdig ...

  10. POJ 1287 Networking (最小生成树模板题)

    Description You are assigned to design network connections between certain points in a wide area. Yo ...