Bootstrap

css3制作百鸟时钟

初出茅庐,我们一起进步!!!

css3制作

百鸟时钟

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>白鸟时钟</title>
    <style>
        .wap{
            width: 700px;
            height: 700px;
            background-image: url('./hour.png');
            border-radius: 50%;
            background-size: cover;
            position: relative;
            margin: 0 auto;
        }
        .wap > div{
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            margin: auto;
        }
        .hour-wap{
            width: 50%;
            height: 50%;
            /* background-color: rgb(245, 242, 242); */
            animation: run 4320s infinite;
            transition: inherit;
        }
        .hour{
            width: 5px;
            height: 50%;
            background-color: rgb(6, 1, 14);
            margin: 0 auto;
        }
        .two-wap{
            width: 70%;
            height: 70%;
            /* background-color: rgb(245, 242, 242); */
            animation: run 360s steps(60) infinite;
            transition: inherit;
        }
        .two{
            width: 3px;
            height: 50%;
            background-color: black;
            margin: 0 auto;
        }
        .third-wap{
            width: 90%;
            height: 90%;
            /* background-color: rgb(245, 242, 242); */
            animation: run 6s steps(60) infinite;
            transition: inherit;
        }
        .third{
            width: 2px;
            height: 50%;
            background-color: red;
            margin: 0 auto;
        }
        @keyframes run{
            from{
                transform: rotateZ(0);
            }
            to{
                transform: rotateZ(360deg);
            }
        }
    </style>
</head>
<body>
    <div class="wap">
        <div class="hour-wap">
            <div class="hour"></div>
        </div>
        <div class="two-wap">
            <div class="two"></div>
        </div>
        <div class="third-wap">
            <div class="third"></div>
        </div>
    </div>
</body>
</html>