首页 > 其他 > 详细

Relative与Absolute组合使用

时间:2018-09-25 21:39:22      阅读:149      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
	<title>框架</title>
	<style type="text/css">
	div{border: solid black 1px;}
	h1{
		color: red;
	}
	div{
		background-color: #0fc;
	}
	.box1{
		width: 800px;
		height: 100px;
		position: relative;
	}
	.box2{
		width: 200px;
		height: 300px;
		top: 100px;
		position: absolute;
	}
	.box3{
		width: 400px;
		height: 100px;
		left: 200px;
		top: 100px;
		position: absolute;	
	}
	.box4{
		width: 400px;
		height: 100px;
		left: 200px;
		top: 200px;
		position: absolute;
	}
	.box5{
		width: 400px;
		height: 100px;
		left: 200px;
		top: 300px;
		position: absolute;
	}
	.box6{
		width: 200px;
		height: 300px;
		left: 600px;
		top: 100px;
		position: absolute;
	}
	</style>
</head>
<body>
    <h1>Relative与Absolute组合使用</h1>
    <br>
    <div class="box1">
       <div class="box2"></div>
       <div class="box3"></div>
       <div class="box4"></div>
       <div class="box5"></div>
       <div class="box6"></div>
    </div>
</body>
</html>

  

Relative与Absolute组合使用

原文:https://www.cnblogs.com/ljming/p/9703579.html

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