纯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教程之倾斜页面
Jan 27 HTML / CSS
纯css3实现的竖形无限级导航
Dec 10 HTML / CSS
使用CSS3中的calc()属性来以算式表达尺寸数值
Jun 06 HTML / CSS
用CSS3实现瀑布流布局的示例代码
Nov 10 HTML / CSS
H5 canvas中width、height和style的宽高区别详解
Nov 02 HTML / CSS
关于HTML5的22个初级技巧(图文教程)
Jun 21 HTML / CSS
将HTML5 Canvas的内容保存为图片借助toDataURL实现
May 20 HTML / CSS
html5 canvas合成海报所遇问题及解决方案总结
Aug 03 HTML / CSS
浅谈HTML5新增和废弃的标签
Apr 28 HTML / CSS
使用数据结构给女朋友写个Html5走迷宫游戏
Nov 26 HTML / CSS
CSS实现两列布局的N种方法
Aug 02 HTML / CSS
CSS link与@import的区别和用法解析
May 07 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或asp创建网页桌面快捷方式的代码
2010/03/23 PHP
PHP实现仿Google分页效果的分页函数
2015/07/29 PHP
Laravel实现ORM带条件搜索分页
2019/10/24 PHP
TP5框架页面跳转样式操作示例
2020/04/05 PHP
PHP7 foreach() 函数修改
2021/03/09 PHP
javascript form 验证函数 弹出对话框形式
2009/06/23 Javascript
JavaScript中的property和attribute介绍
2011/12/26 Javascript
根据选择不同的下拉值出现相对应的文本输入框
2013/08/01 Javascript
jQuery 滑动方法slideDown向下滑动元素
2014/01/16 Javascript
实践中学习AngularJS表单
2016/03/21 Javascript
js document.getElementsByClassName的使用介绍与自定义函数
2016/11/25 Javascript
canvas实现流星雨的背景效果
2017/01/13 Javascript
基于Marquee.js插件实现的跑马灯效果示例
2017/01/25 Javascript
JavaScript注册时密码强度校验代码
2017/06/30 Javascript
mac中利用NVM管理不同node版本的方法详解
2017/11/08 Javascript
vue解决使用$http获取数据时报错的问题
2019/10/30 Javascript
使用cx_freeze把python打包exe示例
2014/01/24 Python
Python程序打包工具py2exe和PyInstaller详解
2019/06/28 Python
最新2019Pycharm安装教程 亲测
2020/02/28 Python
Tensorflow中的dropout的使用方法
2020/03/13 Python
Python faker生成器生成虚拟数据代码实例
2020/07/20 Python
Hunkemöller西班牙:欧洲最大的内衣连锁店
2018/08/15 全球购物
伦敦著名的运动鞋综合商店:Footpatrol
2019/03/25 全球购物
巴西24小时在线药房:Drogasil
2020/06/20 全球购物
SQL Server数据库笔试题和答案
2016/02/04 面试题
搞笑婚礼主持词
2014/03/13 职场文书
倡议书的写法
2014/08/30 职场文书
法定代表人授权委托书格式
2014/10/14 职场文书
2014年企业员工工作总结
2014/12/09 职场文书
2015年党员公开承诺书范文
2015/01/22 职场文书
不同意离婚代理词
2015/05/23 职场文书
生鲜超市—未来中国最具有潜力零售业态
2019/08/02 职场文书
文案策划岗位个人自我评价(范文)
2019/08/08 职场文书
sql通过日期判断年龄函数的示例代码
2021/07/16 SQL Server
Nginx配置https的实现
2021/11/27 Servers
MySQL表字段数量限制及行大小限制详情
2022/07/23 MySQL