太极图

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>太极图</title>
    <style>
        body {
            margin: 0;
        }

        /* 大圈 */
        .box1 {
            position: relative;
            width: 500px;
            height: 500px;
            margin: 20px auto;
            border: 1px solid black;
            border-radius: 50%;
            box-sizing: border-box;
            overflow: hidden;
        }

        /* 分割为左右两块 */
        .box1::before,
        .box1::after {
            position: absolute;
            content: '';
            width: 250px;
            height: 500px;
        }

        .box1::before {
            left: 0;
            background-color: #000;
        }

        .box1::after {
            right: 0;
            background-color: #fff;
        }

        /* 中圈 */
        .box2,
        .box3 {
            position: absolute;
            width: 250px;
            height: 250px;
            left: 50%;
            margin-left: -125px;
            border-radius: 50%;
            box-sizing: border-box;
            z-index: 1;
        }

        .box2 {
            top: -1px;
            background-color: #000;
        }

        .box3 {
            bottom: 0;
            background-color: #fff;
        }

        /* 小圈 */
        .box2::after,
        .box3::after {
            position: absolute;
            top: 50%;
            left: 50%;
            margin-top: -25px;
            margin-left: -25px;
            content: '';
            width: 50px;
            height: 50px;
            border-radius: 50%;
        }

        .box2::after {
            background-color: #fff;
        }

        .box3::after {
            background-color: #000;
        }
    </style>
</head>

<body>
    <div class="box1">
        <div class="box2"></div>
        <div class="box3"></div>
    </div>
</body>

</html>
img.jpg
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容