2-10编程练习

来源:2-10 编程练习

qq_紾悕_1

2018-11-08 20:10:46

<!DOCTYPE html>

<html>

<head>

  <meta charset="UTF-8">

  <title>Document</title>

  <style>

    /*完善下列代码*/

    .per{

        position:relative;

     width: 300px;

     height: 300px;

     background: red;

     margin-left:200px;

     margin-top: 200px;

   }


   .son{

       position:absolute;

     width: 100px;

     height: 100px;

     background: blue;

     top:0;

     left:0;

     right:0;

     bottom:0;

     margin: auto auto;

     

   }

  </style>

</head>

<body>

  <div class="per">

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

  </div>

</body>

</html>


写回答

1回答

妮可妮可妮_

2018-11-09

测试了你的代码,效果可以实现

继续加油!


0

0 学习 · 36712 问题

查看课程

相似问题