首页 > 其他 > 详细

position

时间:2018-09-25 13:55:32      阅读:160      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./dsmd.css">
<title>Document</title>
</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>
 
 
dsmd.css
.box {
display: inline-block;
width: 100px;
height: 100px;
background: red;
color: white;
}
 
#two {
position: absolute;//探究position中static、absolute、relative、fixed、sticky的区别
top: 20px;
left: 20px;
background: blue;
}
 

position

原文:https://www.cnblogs.com/wxc2/p/9698991.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!