-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path三列宽度自适应.html
73 lines (59 loc) · 1.13 KB
/
三列宽度自适应.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<html>
<head>
<meta http-equiv="Content-Type" content="content-type:text/html;charset=utf-8">
<style type="text/css">
* {
margin: 0;
padding: 0;
}
.header, .footer {
height: 30px;
line-height: 30px;
text-align: center;
color: #ffffff;
background-color: #aaaaaa;
}
.container {
text-align: center;
color: #ffffff;
}
.mainBox {
float: left;
width: 100%;
background-color: #ffffff;
}
.mainBox .content {
margin: 0 21% 0 41%;
background-color: #000000;
}
.subMainBox {
float: left;
width: 40%;
margin-left: -100%;
background-color: #666666;
}
.sideBox {
float: left;
width: 20%;
margin-left: -20%;
background-color: #666666;
}
.footer {
clear: both;
}
</style>
</head>
<body>
<div class="header">头部信息</div>
<div class="container">
<div class="mainBox">
<div class="content">
主要内容区域
</div>
</div>
<div class="subMainBox">次要内容区域</div>
<div class="sideBox">侧边栏</div>
</div>
<div class="footer">底部信息</div>
</body>
</html>