首页 > web前端 > css教程 > 正文

大疆官网的视频加载动画 by css3 animation

高洛峰
发布: 2017-02-24 09:59:54
原创
2071人浏览过

用的时候得注意下兼容性,现代浏览器chrome、ff、edge以及移动端都是可以的,ie 9以下的就不行了。

代码如下:

  css样式

.spinner {
    margin: 0 auto;
    width: 82px;
    text-align: center;
}
#fancybox-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: -9px;
    margin-left: -41px;
    opacity: .8;
    cursor: pointer;
    z-index: 8060;
}
.spinner>div {
    margin: 0 2px;
    width: 18px;
    height: 18px;
    background-color: #333;
    -webkit-border-radius: 100%;
    -moz-border-radius: 100%;
    -ms-border-radius: 100%;
    -o-border-radius: 100%;
    border-radius: 100%;
    display: inline-block;
     -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; 
    -moz-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
    -ms-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
    -o-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
     animation: sk-bouncedelay 1.4s infinite ease-in-out both; 
}
.spinner .bounce1 {
    -webkit-animation-delay: -.32s;
    -moz-animation-delay: -.32s;
    -ms-animation-delay: -.32s;
    -o-animation-delay: -.32s;
    animation-delay: -.32s;
}    
.spinner .bounce2 {
    -webkit-animation-delay: -.16s;
    -moz-animation-delay: -.16s;
    -ms-animation-delay: -.16s;
    -o-animation-delay: -.16s;
    animation-delay: -.16s;
}
@keyframes sk-bouncedelay {
    0%,80%,100% {
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
        transform: scale(0)
    }
    40% {
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
        transform: scale(1)
    }
}
登录后复制

 html结构

<div id="fancybox-loading" class="spinner">
    <div class="bounce1"></div>
    <div class="bounce2"></div>
    <div class="bounce3"></div>
</div>
登录后复制

立即学习前端免费学习笔记(深入)”;

更多大疆官网的视频加载动画 by css3 animation相关文章请关注PHP中文网!

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号