实例
<!DOCTYPE html> <html lang="zh"> <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></title> <style type="text/css"> *{ margin: 0; padding: 0; } .row{ position: relative; width: 800px; top: 50px; margin: 0 auto; } .row1{ width: 200px; height: 200px; border: 15px solid #0781ca; border-radius: 50%; } .row2{ width: 200px; height: 200px; border: 15px solid #1d1d1d; border-radius: 50% ; position: absolute; left:237px; top: 0; bottom: 0; right: 0; } .row3{ display: inline-block; width: 200px; height: 200px; border: 15px solid #d42009; border-radius: 50% ; position: absolute; left: 475px; top: 0; bottom: 0; right: 0; } .row4{ width: 200px; height: 200px; border: 15px solid #f5c500; border-radius: 50% ; position: absolute; bottom: 430px; top: 122px; left: 120px; } .row5{ width: 200px; height: 200px; border: 15px solid #427d13; border-radius: 50% ; position: absolute; bottom: 141px; top: 122px; left: 366px; } </style> </head> <body> <div class="row"> <div class="row1 cent"></div> <div class="row2 cent"></div> <div class="row3 cent"></div> <div class="row4 cent"></div> <div class="row5 cent"></div> </div> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例