其他分享
首页 > 其他分享> > 旋转太极

旋转太极

作者:互联网

效果显示

<!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 私信 关注

标签:gradient,50%,transform,旋转,20%,background,black,太极
来源: https://blog.csdn.net/gklcsdn/article/details/103993319