misubishi

导航

Position

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Position</title>
        <link rel="stylesheet" href="Position.css" /> 
    </head>
    <body>
        <div class="box" id="one">One</div>
<div class="box" id="two">Two</div>
<div class="box" id="three">Three</div>
<div class="box" id="four">Four</div>
    </body>
</html>
.box {
  display: inline-block;
  width: 100px;
  height: 100px;
  background: red;
  color: white;
}

#two {
  position: static;
  top: 20px;
  left: 20px;
  background: blue;
}

实验效果为:

 

posted on 2018-09-23 21:15  mitsubishi  阅读(121)  评论(0编辑  收藏  举报