美文网首页
css3之加载

css3之加载

作者: 白衣诗人 | 来源:发表于2019-01-16 14:30 被阅读0次
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8;">
<title>CSS3实现加载的动画效果1</title>
<meta name="author" content="rainna" />
<meta name="keywords" content="rainna's css lib" />
<meta name="description" content="CSS3" />
<style>
*{margin:0;padding:0;}
body{background:#535353;}

.m-load,.m-load2{width:36px;height:36px;margin:100px auto;}
.m-load{background:url('load-v1.gif') #535353 center center no-repeat;}
.m-load2{background:#535353;}

/** 加载动画的静态样式 **/
.m-load2{position:relative;}
.m-load2 .line div{position:absolute;left:16px;top:0;width:3px;height:36px;}
.m-load2 .line div:before,.m-load2 .line div:after{content:'';display:block;height:50%;background:#fcfcfc;border-radius:5px;}
.m-load2 .line div:nth-child(2){-webkit-transform:rotate(30deg);}
.m-load2 .line div:nth-child(3){-webkit-transform:rotate(60deg);}
.m-load2 .line div:nth-child(4){-webkit-transform:rotate(90deg);}
.m-load2 .line div:nth-child(5){-webkit-transform:rotate(120deg);}
.m-load2 .line div:nth-child(6){-webkit-transform:rotate(150deg);}
.m-load2 .circlebg{position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-9px 0 0 -9px;background:#535353;border-radius:18px;}

/** 加载动画 **/
@-webkit-keyframes load{
    0%{opacity:0;}
    100%{opacity:1;}
}
.m-load2 .line div:nth-child(1):before{-webkit-animation:load 1.2s linear 0s infinite;}
.m-load2 .line div:nth-child(2):before{-webkit-animation:load 1.2s linear 0.1s infinite;}
.m-load2 .line div:nth-child(3):before{-webkit-animation:load 1.2s linear 0.2s infinite;}
.m-load2 .line div:nth-child(4):before{-webkit-animation:load 1.2s linear 0.3s infinite;}
.m-load2 .line div:nth-child(5):before{-webkit-animation:load 1.2s linear 0.4s infinite;}
.m-load2 .line div:nth-child(6):before{-webkit-animation:load 1.2s linear 0.5s infinite;}
.m-load2 .line div:nth-child(1):after{-webkit-animation:load 1.2s linear 0.6s infinite;}
.m-load2 .line div:nth-child(2):after{-webkit-animation:load 1.2s linear 0.7s infinite;}
.m-load2 .line div:nth-child(3):after{-webkit-animation:load 1.2s linear 0.8s infinite;}
.m-load2 .line div:nth-child(4):after{-webkit-animation:load 1.2s linear 0.9s infinite;}
.m-load2 .line div:nth-child(5):after{-webkit-animation:load 1.2s linear 1s infinite;}
.m-load2 .line div:nth-child(6):after{-webkit-animation:load 1.2s linear 1.1s infinite;}
</style>
</head>

<body>
<div class="m-load"></div>

<div class="m-load2">
    <div class="line">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
    <div class="circlebg"></div>
</div>
</body>
</html>

相关文章

  • css3之加载

  • 值得收藏的CSS库

    Single Element CSS Spinners CSS3加载动效,经常会需要一些动效来表达系统处于加载或处...

  • Facebook loading animation using

    背景虚化加载,用css3实现facebook的loading的实现方式。 To display loading e...

  • 每日总结

    每日单词 CSS3新增特性 @Font-face 特性 加载字体样式,而且它还能够加载服务器端的字体文件,让客户端...

  • webpack postcss

    css自动加载前缀 CSS3是目前作为一个前端必须要掌握的技能,但是由于现在好多浏览器还是不兼容CSS3,所以前端...

  • H5及CSS3兼容处理方案

    1.加载兼容文件JS IE8及以下不支持H5、CSS3 Media,所以加载html3shiv.min.js及re...

  • [ CSS3 系列] 一文读懂 Animation 中的时间函数

    利用 css3 的 Animation 可以创建动画,在许多页面中能够替代 flash、JS 等,提升页面加载速度...

  • CSS3 加载动画

    前两篇博客讲了一些 CSS 形状的基础知识,如果结合 CSS3 动画还能做出各种加载动画来,比起用 gif 动画更...

  • 7月第四周

    7.24 CSS3 属性之 transform & translation transform: translat...

  • ajax请求等候效果

    使用css+js来实现加载中效果 css3中使用-webkit-animation: load 2.08s lin...

网友评论

      本文标题:css3之加载

      本文链接:https://www.haomeiwen.com/subject/anrmdqtx.html