纯CSS实现预加载动画效果


Posted in HTML / CSS onSeptember 06, 2017

效果图

纯CSS实现预加载动画效果

下载地址:http://xiazai.3water.com/201709/yuanma/css_loading_3water.rar

<style>
    #loading {
        position:absolute;
        left:0;
        top:0;
        width:100%;
        height:100%;
        background: #121220;
        overflow:hidden;
        z-index:9999;
    }
    /*加载圈*/
    .spinner {
        margin:0 auto;
        width:60px;
        height:60px;
        position:relative;
        top:40%;
    }
    .container1 > div,.container2 > div,.container3 > div {
        width:15px;
        height:15px;
        background-color:#fff;
        border-radius:100%;
        position:absolute;
        -webkit-animation:bouncedelay 1.2s infinite ease-in-out;
        animation:bouncedelay 1.2s infinite ease-in-out;
        -webkit-animation-fill-mode:both;
        animation-fill-mode:both;
    }
    .spinner .spinner-container {
        position:absolute;
        width:100%;
        height:100%;
    }
    .container2 {
        -webkit-transform:rotateZ(45deg);
        transform:rotateZ(45deg);
    }
    .container3 {
        -webkit-transform:rotateZ(90deg);
        transform:rotateZ(90deg);
    }
    .circle1 {
        top:0;
        left:0;
    }
    .circle2 {
        top:0;
        right:0;
    }
    .circle3 {
        right:0;
        bottom:0;
    }
    .circle4 {
        left:0;
        bottom:0;
    }
    .container2 .circle1 {
        -webkit-animation-delay:-1.1s;
        animation-delay:-1.1s;
    }
    .container3 .circle1 {
        -webkit-animation-delay:-1.0s;
        animation-delay:-1.0s;
    }
    .container1 .circle2 {
        -webkit-animation-delay:-0.9s;
        animation-delay:-0.9s;
    }
    .container2 .circle2 {
        -webkit-animation-delay:-0.8s;
        animation-delay:-0.8s;
    }
    .container3 .circle2 {
        -webkit-animation-delay:-0.7s;
        animation-delay:-0.7s;
    }
    .container1 .circle3 {
        -webkit-animation-delay:-0.6s;
        animation-delay:-0.6s;
    }
    .container2 .circle3 {
        -webkit-animation-delay:-0.5s;
        animation-delay:-0.5s;
    }
    .container3 .circle3 {
        -webkit-animation-delay:-0.4s;
        animation-delay:-0.4s;
    }
    .container1 .circle4 {
        -webkit-animation-delay:-0.3s;
        animation-delay:-0.3s;
    }
    .container2 .circle4 {
        -webkit-animation-delay:-0.2s;
        animation-delay:-0.2s;
    }
    .container3 .circle4 {
        -webkit-animation-delay:-0.1s;
        animation-delay:-0.1s;
    }
    @-webkit-keyframes bouncedelay {
        0%,80%,100% {
            -webkit-transform:scale(0.0)
        }
        40% {
            -webkit-transform:scale(1.0)
        }
    }
    @keyframes bouncedelay {
        0%,80%,100% {
            transform:scale(0.0);
            -webkit-transform:scale(0.0);
    }
        40% {
            transform:scale(1.0);
            -webkit-transform:scale(1.0);
        }
    }
</style>
<body>
    <div id="loading" >
        <div class="spinner">
          <div class="spinner-container container1">
            <div class="circle1"></div>
            <div class="circle2"></div>
            <div class="circle3"></div>
            <div class="circle4"></div>
          </div>
          <div class="spinner-container container2">
            <div class="circle1"></div>
            <div class="circle2"></div>
            <div class="circle3"></div>
            <div class="circle4"></div>
          </div>
          <div class="spinner-container container3">
            <div class="circle1"></div>
            <div class="circle2"></div>
            <div class="circle3"></div>
            <div class="circle4"></div>
          </div>
        </div>
    </div>
</body>

总结

以上所述是小编给大家介绍的纯CSS实现预加载动画效果,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对三水点靠木网站的支持!

HTML / CSS 相关文章推荐
一款简洁的纯css3代码实现的动画导航
Oct 31 HTML / CSS
通过CSS3的object-fit来调整图片适配尺寸的技巧简介
Feb 27 HTML / CSS
利用Bootstrap实现漂亮简洁的CSS3价格表实例源码
Mar 02 HTML / CSS
详解CSS3实现响应式手风琴效果
Jun 10 HTML / CSS
input file上传文件样式支持html5的浏览器解决方案
Nov 14 HTML / CSS
html5画布旋转效果示例
Jan 27 HTML / CSS
html5绘制时钟动画
Dec 15 HTML / CSS
HTML5 canvas标签实现刮刮卡效果
Apr 24 HTML / CSS
Html5实现二维码扫描并解析
Jan 20 HTML / CSS
利用HTML5 Canvas API绘制矩形的超级攻略
Mar 21 HTML / CSS
移动端HTML5实现文件上传功能【附代码】
Mar 25 HTML / CSS
CSS3实现的水平标题菜单
Apr 14 HTML / CSS
使用CSS3制作倾斜导航条和毛玻璃效果
Sep 12 #HTML / CSS
分享8款纯CSS3实现的搜索框功能
Sep 14 #HTML / CSS
详解CSS3 用border写 空心三角箭头 (两种写法)
Sep 29 #HTML / CSS
详解使用CSS3的@media来编写响应式的页面
Nov 01 #HTML / CSS
CSS3轻松实现圆角效果
Nov 09 #HTML / CSS
详解css3自定义滚动条样式写法
Dec 25 #HTML / CSS
简单掌握CSS3将文字描边及填充文字颜色的方法
Mar 07 #HTML / CSS
You might like
php中获得视频时间总长度的另一种方法
2011/09/15 PHP
PHP安装threads多线程扩展基础教程
2015/11/17 PHP
PHP微信模板消息操作示例
2017/06/29 PHP
ThinkPHP 5.1 跨域配置方法
2019/10/11 PHP
javascript 模式设计之工厂模式学习心得
2010/04/27 Javascript
JavaScript 获取当前时间戳的代码
2010/08/05 Javascript
跨浏览器通用、可重用的选项卡tab切换js代码
2011/09/20 Javascript
js模仿html5 placeholder适应于不支持的浏览器
2013/01/13 Javascript
js 中将多个逗号替换为一个逗号的代码
2014/06/07 Javascript
jQuery中prepend()方法用法实例
2014/12/25 Javascript
使用jQuery实现鼠标点击左右按钮滑动切换
2017/08/04 jQuery
vue+swiper实现组件化开发的实例代码
2017/10/26 Javascript
JS数组Object.keys()方法的使用示例
2019/06/05 Javascript
jQuery操作元素的内容和样式完整实例分析
2020/01/10 jQuery
vue学习笔记之给组件绑定原生事件操作示例
2020/02/27 Javascript
微信小程序实现watch监听
2020/06/04 Javascript
Python中time模块与datetime模块在使用中的不同之处
2015/11/24 Python
Python解析树及树的遍历
2016/02/03 Python
python添加模块搜索路径方法
2017/09/11 Python
Python网络爬虫神器PyQuery的基本使用教程
2018/02/03 Python
python多线程下信号处理程序示例
2019/05/31 Python
Django发送邮件和itsdangerous模块的配合使用解析
2019/08/10 Python
Anaconda 查看、创建、管理和使用python环境的方法
2019/12/03 Python
CSS3制作3D立方体loading特效
2020/11/09 HTML / CSS
css3中flex布局宽度不生效的解决
2020/12/09 HTML / CSS
AmazeUI 网格的实现示例
2020/08/13 HTML / CSS
阿根廷在线宠物商店:Puppis
2018/03/23 全球购物
旅游管理毕业生自荐信范文
2014/03/19 职场文书
小学校园之星事迹材料
2014/05/16 职场文书
用人单位终止解除劳动合同证明书
2014/10/06 职场文书
北京英文导游词
2015/02/12 职场文书
2015年幼儿教师个人工作总结
2015/05/20 职场文书
幼师自荐信范文(2016推荐篇)
2016/01/28 职场文书
导游词之嵊泗列岛
2019/10/30 职场文书
mysql5.7使用binlog 恢复数据的方法
2021/06/03 MySQL
微信小程序 根据不同用户切换不同TabBar
2022/04/21 Javascript