批改狀態(tài):合格
老師批語:下次把對應(yīng)的作業(yè)標(biāo)題寫上, 以方便核對
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style type="text/css"> .parent { position: relative; border: 1px dashed gray; width: 450px; height: 450px; } .box1 { width: 150px; height: 150px; background-color: lightblue; border-radius: 50%; } .box2 { width: 150px; height: 150px; background-color: lightgray; border-radius: 50%; } .box3 { width: 150px; height: 150px; background-color: lightgreen; border-radius: 50%; } .box4 { width: 150px; height: 150px; background-color: lightcoral; border-radius: 50%; } .box5 { width: 150px; height: 150px; background-color: lightseagreen; border-radius: 50%; } .box1 { position: absolute; left: 150px; border-radius: 50%; } .box2 { position: absolute; top: 150px; border-radius: 50%; } .box3 { position: absolute; left: 300px; top: 150px; border-radius: 50%; } .box4 { position: absolute; left: 150px; top: 150px; border-radius: 50%; } .box5 { position: absolute; left: 150px; top: 300px; border-radius: 50%; } </style> <title>20190705作業(yè),絕對定位小案例(</title> </head> <body> <div class="parent"> <div class="box1"></div> <div class="box2"></div> <div class="box3"></div> <div class="box4"></div> <div class="box5"></div> </div> </body> </html>
點擊 "運行實例" 按鈕查看在線實例
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號