大疆官網的視頻載入動畫 by css3 animation

來源:互聯網
上載者:User
用的時候得注意下相容性,現代瀏覽器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>


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.