太极图

点击查看代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .container{
            margin: 5% 0 0 30%;
            width: 200px;
            height: 200px;
            position: relative;
        }
        .left{
            height: 100px;
            width: 200px;
            border-radius: 100px 100px 0 0;
            border: 1px black solid;
            background-color: white;
            transform: rotate(-90deg) translate(-50px,-50px);
        }
        .right{
            height: 100px;
            width: 200px;
            border-radius: 0 0 100px 100px;
            border: 1px black solid;
            background-color: black;
            transform: rotate(-90deg) translate(52px,51px);
        }
        .top{
            height: 100px;
            width: 100px;
            border: 1px white solid;
            border-radius: 100%;
            position: absolute;
            background-color: white;
            transform:translate(50px,-203px);
        }
        .bottom{
            height: 100px;
            width: 100px;
            border: 1px black solid;
            border-radius: 100%;
            position: absolute;
            background-color: black;
            transform:translate(50px,-103px);
        }
        .in-top{
            height: 40px;
            width: 40px;
            border: 1px black solid;
            border-radius: 100%;
            position: absolute;
            background-color: black;
            transform:translate(80px,-175px);
        }
        .in-bottom{
            height: 40px;
            width: 40px;
            border: 1px white solid;
            border-radius: 100%;
            position: absolute;
            background-color: white;
            transform:translate(80px,-75px);
        }
        .container{
            animation: circle 1s linear 1s infinite;
        }
        @keyframes circle {
            0%{
                transform: rotate(1deg);
            }
            100%{
                transform: rotate(360deg);
            }
        }
    </style>
</head>
<body>
  <div class="container">
    <div class="left"></div>  <!--左半圆-->
    <div class="right"></div>  <!--右半圆-->
    <div class="top"></div>  <!--上面白色圆圈-->
    <div class="bottom"></div>  <!--下面的黑色圆圈-->
    <div class="in-top"></div>  <!--上面里面的黑圆圈-->
    <div class="in-bottom"></div>  <!--上面里面的白圆圈-->
  </div>
</body>
</html>
Title
posted @ 2022-11-21 11:31  笑到肚子疼  阅读(32)  评论(0)    收藏  举报