-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path绝对定位布局.html
27 lines (27 loc) · 989 Bytes
/
绝对定位布局.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<style type="text/css">
*{margin:0;padding:0}
.wrap{width:960px;margin:0 auto;}
.hearder{width:100%;height:100px;background:#0FF;}
.mainBody{width:100%;height:600px;background:#ccc;position:relative;}
.sliderBar{width:200px;height:600px;background:#FF0;}
.content{height:400px;background:#0F0;position:absolute;top:0;margin-left:220px}
.footer{width:100%;height:100px;background:#F0F;}
</style>
<body>
<div class="wrap">
<div class="hearder">hearder</div>
<div class="mainBody">
<div class="sliderBar">sliderBar;注意:该高度必须大于"content"的高度</div>
<div class="content">content</div>
</div>
<div></div>
<div class="footer">footer</div>
</div>
</body>
</html>