老师,请帮我按下 2-14 编程练习 这样写,是否可以呢?

来源:2-14 编程练习

qq_爱我所爱_9

2018-09-24 16:30:31

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    *{
      margin: 0;
      padding:0;
    }
    .test{
     width: 800px;
     height: 100px;
     background: red;
     /*此处写代码*/
     position:fixed;
     left:0px;
     right:0px;
     margin:0 auto;
   }
   .out{
    width: 100%;
    height: 2000px;
    background-color: #abcdef;
  }
</style>
</head>
<body>
  <div class="out">
    <div class="test"></div>
  </div>
</body>
</html>


写回答

1回答

时间,

2018-09-25

效果实现了,这么写是可以的

0

0 学习 · 36712 问题

查看课程