CSS3 旋轉的八卦圖


<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>css3八卦</title>
    <style>
        #container{height: 203px;width: 200px;border-radius: 200px;box-shadow: 0 0 4px #666666;margin: 100px auto;
            background: linear-gradient(90deg,black 50%,white 50%);}
        #top,#bottom{height: 100px;width: 100px;margin: 0 auto;border-radius: 100px}
        #top{border: 1px solid white;}
        #bottom{border: 1px solid black;}
        #inner1,#inner2{height:25px;width: 25px;margin: 25px  auto;border-radius: 50px; }
        #inner1{background: black}
        #inner2{background: white}
        #top{background: white}
        #bottom{background: black}
        @keyframes bonce{
            0%{transform: rotate(0deg)}
            100%{transform: rotate(360deg)}
        }
        #container{animation: bonce 5s infinite linear;}
    </style>
</head>
<body>
<div id="container">
    <div id="top">
        <div id="inner1"></div>
    </div>
    <div id="bottom">
        <div id="inner2"></div>
    </div>
</div>

</body>
</html>

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM