ホームページ  >  記事  >  ウェブフロントエンド  >  DJI公式サイト動画 CSS3アニメーションによる読み込みアニメーション

DJI公式サイト動画 CSS3アニメーションによる読み込みアニメーション

高洛峰
高洛峰オリジナル
2017-02-24 09:59:541834ブラウズ

使用する際は互換性に注意する必要があります。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>


その他のDJI公式ウェブサイトのcss3アニメーションによるアニメーション読み込みアニメーション関連記事については、PHP中国語ウェブサイトに注目してください。 !


声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。