老师,可以看一下代码正确?
来源:2-10 编程练习
生石灰遇见水
2019-11-26 21:07:02
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <style type="text/css"> div.parent{width:200px; height:200px; background:red; border:2px blue solid; position:relative; } .son{ width:60px; height:60px; background:pink; border:2px solid yellow; position:absolute; top:0; bottom:0; left:0; right:0; margin:auto auto; } </style> </head> <body> <div class="parent"> <div class="son">b</div> </div> </body> </html>
1回答
同学你好,代码是正确的,继续加油, 祝学习愉快~
相似问题