zoukankan      html  css  js  c++  java
  • css画太极

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>css画太极</title>
        <style>
            body{
                background-color: grey;
            }
            #yinyang{
                 300px;
                height: 300px;
                border-radius: 50%;
                background-color: #fff;
                position: relative;
                left:calc(50% - 150px);  /* calc 操作符的两边必须有空间*/
                background: linear-gradient(to bottom, #ffffff 0%,#ffffff 50%,#000000 50%,#000000 100%); 
            }
            #yin{
                50%;
                height: 50%;
                background-color: #000000;
                border-radius: 50%;
                position: absolute;
                top:25%;
            }
            #yang{
                50%;
                height: 50%;
                background-color: #ffffff;
                border-radius: 50%;
                position: absolute;
                top:25%;
                right: 0;
            }
            .yangpoint{
                background-color:#ffffff;
                20%;
                height: 20%;
                border-radius:50%;
                position: absolute;
                left:40%;
                top:40%; /* 50%-20%/2*/
            }
            .yinpoint{
                background-color:#000000;
                20%;
                height: 20%;
                border-radius:50%;
                position: absolute;
                left:40%;
                top:40%;
            }
        </style>
    </head>
    <body>
        <div id="yinyang">
            <div id="yin">
                <div class="yangpoint"></div>
            </div>
            <div id="yang">
                <div class="yinpoint"></div>
            </div>
        </div>
    </body>
    </html>
    
  • 相关阅读:
    练习5-3 数字金字塔 (15分)
    JSTL标签
    ssm+mysql+jsp打造在线考试系统WeKnow-学生端
    JSP常用内置对象
    mybatis入门2
    mybtis入门
    数据源的作用
    ssm动态查询向前台传json
    ssm中的注解
    ssm中的模糊查询
  • 原文地址:https://www.cnblogs.com/ShawSpring/p/10886040.html
Copyright © 2011-2022 走看看