欢迎光临十大正规赌博平台!

十大正规赌博平台个人网站-十大正规赌博平台个人博客-杨照佳

正规博彩十大公司

关注世界十大博彩公司的博客网站

首页 > WEB开发 > css3案例分享 >

一份纯CSS loading动画效果代码示例

发布时间:2017-12-05  编辑:正规博彩十大公司   点击:   

本文介绍了一份纯CSS loading效果代码示例,分享给大家,具体如下:

预览

一份纯CSS loading动画效果代码示例

代码

使用了CSS的keyframes自定义关键帧动画

<!DOCTYPE Html>  
<Html lang="en">  
    <head>
        <title>Loading</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <style>
            div#preload {
    margin: auto;
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999999
}

div#preload>img {  
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    -webkit-transform: translate(-50%,-50%);
    -moz-transform: translate(-50%,-50%);
    -ms-transform: translate(-50%,-50%);
    -o-transform: translate(-50%,-50%)
}

div#preload .Cssload-loader {  
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    width: 62px;
    height: 62px;
    top: 50%;
    margin-top: -31px;
    border-radius: 50%;
    -o-border-radius: 50%;
    -ms-border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    perspective: 780px
}

div#preload .Cssload-inner {  
    position: absolute;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    -o-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    border-radius: 50%;
    -o-border-radius: 50%;
    -ms-border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%
}

div#preload .Cssload-inner.Cssload-one {  
    left: 0;
    top: 0;
    animation: Cssload-rotate-one 1.15s linear infinite;
    -o-animation: Cssload-rotate-one 1.15s linear infinite;
    -ms-animation: Cssload-rotate-one 1.15s linear infinite;
    -webkit-animation: Cssload-rotate-one 1.15s linear infinite;
    -moz-animation: Cssload-rotate-one 1.15s linear infinite;
    border-bottom: 3px solid #000
}

div#preload .Cssload-inner.Cssload-two {  
    right: 0;
    top: 0;
    animation: Cssload-rotate-two 1.15s linear infinite;
    -o-animation: Cssload-rotate-two 1.15s linear infinite;
    -ms-animation: Cssload-rotate-two 1.15s linear infinite;
    -webkit-animation: Cssload-rotate-two 1.15s linear infinite;
    -moz-animation: Cssload-rotate-two 1.15s linear infinite;
    border-right: 3px solid #000
}

div#preload .Cssload-inner.Cssload-three {  
    right: 0;
    bottom: 0;
    animation: Cssload-rotate-three 1.15s linear infinite;
    -o-animation: Cssload-rotate-three 1.15s linear infinite;
    -ms-animation: Cssload-rotate-three 1.15s linear infinite;
    -webkit-animation: Cssload-rotate-three 1.15s linear infinite;
    -moz-animation: Cssload-rotate-three 1.15s linear infinite;
    border-top: 3px solid #000
}

@keyframes Cssload-rotate-one {
    0% {
        transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg)
    }

    100% {
        transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg)
    }
}

@-o-keyframes Cssload-rotate-one {
    0% {
        -o-transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg)
    }

    100% {
        -o-transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg)
    }
}

@-ms-keyframes Cssload-rotate-one {
    0% {
        -ms-transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg)
    }

    100% {
        -ms-transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg)
    }
}

@-webkit-keyframes Cssload-rotate-one {
    0% {
        -webkit-transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg)
    }

    100% {
        -webkit-transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg)
    }
}

@-moz-keyframes Cssload-rotate-one {
    0% {
        -moz-transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg)
    }

    100% {
        -moz-transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg)
    }
}

@keyframes Cssload-rotate-two {
    0% {
        transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg)
    }

    100% {
        transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg)
    }
}

@-o-keyframes Cssload-rotate-two {
    0% {
        -o-transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg)
    }

    100% {
        -o-transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg)
    }
}

@-ms-keyframes Cssload-rotate-two {
    0% {
        -ms-transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg)
    }

    100% {
        -ms-transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg)
    }
}

@-webkit-keyframes Cssload-rotate-two {
    0% {
        -webkit-transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg)
    }

    100% {
        -webkit-transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg)
    }
}

@-moz-keyframes Cssload-rotate-two {
    0% {
        -moz-transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg)
    }

    100% {
        -moz-transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg)
    }
}

@keyframes Cssload-rotate-three {
    0% {
        transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg)
    }

    100% {
        transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg)
    }
}

@-o-keyframes Cssload-rotate-three {
    0% {
        -o-transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg)
    }

    100% {
        -o-transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg)
    }
}

@-ms-keyframes Cssload-rotate-three {
    0% {
        -ms-transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg)
    }

    100% {
        -ms-transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg)
    }
}

@-webkit-keyframes Cssload-rotate-three {
    0% {
        -webkit-transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg)
    }

    100% {
        -webkit-transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg)
    }
}

@-moz-keyframes Cssload-rotate-three {
    0% {
        -moz-transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg)
    }

    100% {
        -moz-transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg)
    }
}
        </style>
    </head>
    <body>
    <div id="preload">
                    <div class="Cssload-loader">
                <div class="Cssload-inner Cssload-one"></div>
                <div class="Cssload-inner Cssload-two"></div>
                <div class="Cssload-inner Cssload-three"></div>
            </div>

    </div>
    </body>
</Html>  

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持十大正规赌博平台个人博客

本文地址:/web/css3/18500.html
转载请注明出处。
分享是一种快乐,也是一种美德:
评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
博客首页 | WEB开发 | 网站运营 | CMS使用教程 滇ICP备14002061号-1