-
Notifications
You must be signed in to change notification settings - Fork 0
/
盒模型及基本的定位.html
115 lines (111 loc) · 1.79 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Box model and Position</title>
<style type="text/css">
.container{
width: 970px;
margin: 0 auto;
}
.headerleft{
width: 277px;
height: 103px;
background-color: red;
margin-bottom: 10px;
float: left;
}
.headerright{
float: right;
}
.short{
width: 137px;
height: 49px;
background-color: #7CFC00;
margin-bottom: 8px;
float: right;
}
.long{
width: 679px;
height: 46px;
background-color: #7CFC00;
margin-bottom: 10px;
clear: right;
}
.main{
clear: left;
}
.mainleft{
width: 310px;
height: 435px;
background-color: orange;
margin-right: 10px;
float: left;
}
.maincenter{
float: left;
}
.one{
width: 450px;
height: 240px;
background-color: #00BFFF;
margin-bottom: 10px;
}
.two{
width: 450px;
height: 110px;
background-color: #00BFFF;
margin-bottom: 10px;
}
.three{
width: 450px;
height: 30px;
background-color: #00BFFF;
margin-bottom: 10px;
}
.mainright{
width: 190px;
height: 400px;
background-color: purple;
margin-left: 10px;
float: left;
}
.mainbottom{
width: 650px;
height: 25px;
background-color: green;
margin-bottom: 10px;
float: left;
}
.footer{
width: 970px;
height: 35px;
background-color: #0000CD;
float: left;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<div class="headerleft"></div>
<div class="headerright">
<div class="short"></div>
<div class="long"></div>
</div>
</div>
<div class="main">
<div class="mainleft"></div>
<div class="maincenter">
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
</div>
<div class="mainright"></div>
<div class="mainbottom"></div>
</div>
<div class="footer">
</div>
</div>
</body>
</html>