请老师帮忙检查代码,谢谢

来源:3-7 编程练习

廖可爱bongbong

2021-05-07 14:29:39

<!DOCTYPE html>

<html>

<head>

  <meta charset="UTF-8">

  <title>Document</title>

  <style>

    /*完善下列代码*/

    .per{

     width: 300px;

     height: 300px;

     background: red;

     margin-left:200px;

     margin-top: 200px;

     position:relative;

   }


   .son{

     width: 100px;

     height: 100px;

     background: blue;

     position:absolute;

     left:50%;

     top:50%;

     margin:-50px;

   }

  </style>

</head>

<body>

  <div class="per">

    <div class="son"></div>

  </div>

</body>

</html>


写回答

1回答

好帮手慕慕子

2021-05-07

同学你好,代码正确,继续加油,祝学习愉快~

0

0 学习 · 15276 问题

查看课程