旋转太极

效果显示

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            background-color: purple;
        }
        .box{
            width: 400px;
            height: 400px;
            background: linear-gradient(to top, black 50%, white 50%);
            margin: 100px auto;
            border-radius: 50%;
            font-size: 0;
            animation: animate 2s infinite linear;
        }
        .box div{
            display: inline-block;
            width: 200px;
            height: 200px;
            border-radius: 50%;
            margin-top: 100px;
        }
        .left{
            background:  radial-gradient(white 20%, black 20%);
        }
        .right{
            background:  radial-gradient(black 20%, white 20%);
        }
        @keyframes animate {
            0%{
                transform: rotate(0deg);
            }
            50%{
                transform: rotate(180deg);
            }
            100%{
                transform: rotate(360deg);
            }

        }
    </style>
</head>
<body>
    <div class="box">
        <div class="left"></div>
        <div class="right"></div>
    </div>
</body>
</html>
旋转太极旋转太极 玩爬虫的小朋友 发布了251 篇原创文章 · 获赞 46 · 访问量 9003 私信 关注
上一篇:graphviz 的使用教程


下一篇:【数据结构】红黑树