html+css实现抽屉网站页面

首先是布局

布局图

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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
*{margin: 0}
.header{
/*width: 100%;*/
height: 48px;
background-color: #2459a2;
}
.action_menu{
width: 1016px;
height: 48px;
margin: 0 auto;
line-height: 48px; /*高度和header一样*/
}
/*导航字体设置*/
.t{
color: white;
/*background-color: #204982;*/
font-size: 12px;
text-decoration: none; /*删除下划线*/
line-height: 48px;
}
/*导航的文本div*/
.text{
margin: 0 13px 0 16px;
}
.right_menu{
}
/*logo图片*/
.logo_img img{
/*margin: 8px;*/
vertical-align: middle; /*调整图片水平居中*/
}
/*用户注册登录文本*/
.user_text{
color: white;
/*background-color: #204982;*/
font-size: 12px;
text-decoration: none; /*删除下划线*/
line-height: 48px;
margin: 0 35px 0 10px;
}
.input_search{
line-height: 22px;
width: 95px;
}
.search_button a img{
vertical-align: middle; /*调整图片水平居中*/
}
.main_containt{
background-color: red;
width: 1016px;
margin: 0 auto;
}
</style>
</head>
<body>
<!--页面头部-->
<div class="header">
<!--页面导航-->
<div class="action_menu">
<!--左侧的菜单-->
<div class="left_menu" style="float: left; width: 500px">
<!--logo标志-->
<div class="logo_img" style="float: left">
<!--<img src="http://dig.chouti.com/images/logo.png" alt="">-->
<a href=""><img src="http://dig.chouti.com/images/logo.png" alt=""></a>
</div>
<div class="text" style="float: left" >
<a class="t" href="">全部</a>
</div>
<div class="text" style="float: left">
<a class="t" href="">42区</a>
</div>
<div class="text" style="float: left">
<a class="t" href="">段子</a>
</div>
<div class="text" style="float: left">
<a class="t" href="">图片</a>
</div>
<div class="text" style="float: left">
<a class="t" href="">挨踢1024</a>
</div>
<div class="text" style="float: left">
<a class="t" href="">你问我答</a>
</div>
<div style="clear: both"></div>
</div>
<!--右侧的注册登录查询-->
<div class="right_menu" style="float:right">
<div class="user" style="float: left" >
<a class="user_text" href="">注册</a>
</div>
<div class="user" style="float: left" >
<a class="user_text" href="">登录</a>
</div>
<div style="float: left">
<input class="input_search" type="text">
</div>
<div class="search_button" style="float: left">
<a class="button_img" href="">
<img src="search_button.jpg">
</a>
</div>
<div style="clear: both"></div>
</div>
<div style="clear: both"></div>
</div>
</div>
<!--内容-->
<div class="main_containt">
<!--新鲜事-->
<div class="news" style="float: left">
<!--最新最热 发布-->
<div class="chose_button">
<div class="hot">
</div>
</div>
</div>
<!--聊天内容-->
<div class="chat" style="float: left">
454654
</div>
<div style="clear: both"></div>
</div>
<div style="clear: both"></div>
</body>
</html>
© 2018 Peter's Blog Center All Rights Reserved.
Theme by hiero