一個div畫太極
阿新 • • 發佈:2018-11-19
程式碼:
<!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>div畫太極</title> <style> *{ margin:0px; padding:0; background-color: #ccc; } div{ margin:20px auto; width:0; height:400px; border-left: 200px solid #000; border-right:200px solid #fff; border-radius: 100%; box-shadow:0 0 50px #000; } div:before{ content:""; display:block; width:75px; height: 75px; margin-left: -100px; border:62px solid #000; background-color:#fff; border-radius:100%; } div:after{ content:""; display:block; width:75px; height: 75px; margin-left: -100px; border:63px solid #fff; background-color:#000; border-radius:100%; } </style> </head> <body> <div></div> </body> </html>
效果圖