• 【CSS3】loading动画


    HTML: 

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>loading</title>
    </head>
    <body>
        <div>
            <ul>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
            </ul>
            <p>loading</p>
        </div>
    </body>
    </html>

    CSS:

        <style>
            * { margin: 0; padding: 0; list-style: none; }
            div { width: 85px; height: 70px; margin: 50px auto; }
            ul { width: 85px; height: 50px; }
            li { width: 8px; height: 50px; background-color: green; float: left; margin-left: 5px; animation: loading 1.2s ease-in-out infinite; }
            p { text-align: center; vertical-align: middle; }
    
            li:nth-of-type(1) {
                animation-delay: -1.1s;
            }
            li:nth-of-type(2) {
                animation-delay: -1s;
            }
            li:nth-of-type(3) {
                animation-delay: -0.9s;
            }
            li:nth-of-type(4) {
                animation-delay: -0.8s;
            }
            li:nth-of-type(5) {
                animation-delay: -0.7s;
            }
            li:nth-of-type(6) {
                animation-delay: -0.6s;
            }
            @keyframes loading {
                0%,100% { transform: scaleY(1); }
                50% { transform: scale(.4); }
            }
        </style>

    HTML:

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
    
        </head>
        <body>
            <div>
                <div></div>
                <img src="img/bg.jpg" alt="">
            </div>
        </body>
    </html>

    css:

            <style type="text/css">
                
                div { width: 200px; height: 200px; border-radius: 50%; position: relative; margin: 100px auto; background-color: black; }
    
                div > * { top: 0; right: 0; bottom: 0; left: 0; margin: auto; }
    
                div > div { width: 95%; height: 95%; border: 5px #333     solid; border-radius: 50%; border-top-color: #eee; background-size: 100%; transform: rotateZ(0deg); position: absolute; }
    
                img { width: 95%; height: 95%; border-radius: 50%; position: absolute; opacity: 1; }
    
                div:hover div { animation: rotate 1s linear infinite; }
                div:hover img { opacity: .6; }
                @keyframes rotate {
                    0% { transform: rotateZ(0deg); }
                    25% { transform: rotateZ(90deg); }
                    50% { transform: rotateZ(180deg); }
                    75% { transform: rotateZ(270deg); }
                    100% { transform: rotateZ(360deg); }
                }
            </style>
    转载请指明出处!
  • 相关阅读:
    4、pytest -- fixtures:明确的、模块化的和可扩展的
    CentOS -- 新建用户并使能密钥登录
    3、pytest -- 编写断言
    2、pytest -- 使用和调用
    1、pytest -- 安装和入门
    《Fluent Python》 -- 一个关于memoryview例子的理解过程
    SecureCRT 连接 Centos7.0 (NAT模式),且能连接公网。
    SecureCRT 连接 Centos7.0 (桥接模式),且能连接公网。
    Centos7.0 三种网络适配器
    Centos 7.0 界面
  • 原文地址:https://www.cnblogs.com/GruntFish/p/6869726.html
Copyright © 2020-2023  润新知