网页布局案例

网页布局案例

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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS网页布局</title>
<link rel="stylesheet" type="text/css" href="css/index.css">
</head>
<body>
<!--头部-->
<div class="header">
<div class="logo">
<img src="image/logo.png" alt="logo">
</div>
<div class="nav">
<ul>
<li>首页</li>
<li>图片</li>
<li>视频</li>
<li>手记</li>
</ul>
</div>
</div>
<!--主体-->
<div class="main">
<div class="top">
<img src="image/1.jpeg">
</div>
<!--遮罩层-->
<div class="topLayer"></div>
<div class="topLayer-top">
<div class="word">MY BEAUTIFUL LIFE</div>
<button>LOK MORE &gt;</button>
</div>
<!--中间部分-->
<div class="middle">
<div class="m-top">
<div class="comment weibo">
<img src="image/weibo.png">
<div class="comm">Weibo</div>
</div>
<div class="comment weixin">
<img src="image/weixin.png">
<div class="comm">WeChat</div>
</div>
<div class="comment qq">
<img src="image/QQ.png">
<div class="comm">QQ</div>
</div>
<div class="clear"></div>
</div>
<div class="m-middle">
"I want to give good things to record down,<br>after the recall will be very beautiful."
</div>
<div class="m-bottom">
<div class="m-com">
<img src="image/03-01.jpg">
<div class="des1">Cool Image</div>
<div class="des2">Record The Picture</div>
</div>
<div class="m-com">
<img src="image/03-02.jpg">
<div class="des1">Cool Image</div>
<div class="des2">Record The Picture</div>
</div>
<div class="m-com">
<img src="image/03-03.jpg">
<div class="des1">Cool Image</div>
<div class="des2">Record The Picture</div>
</div>
</div>
</div>
<!--中间的底部部分-->
<div class="bottom">
<div class="content">
<div class="title">FROM THE PHOTO ALBUM</div>
<div class="pic-content">
<dl>
<dt><img src="image/04-01.jpg"></dt>
<dd class="word">Life is like a book, just read more and more refined, more write more carefully. When read, mind open, all things have been indifferent to heart. Life is the precipitation.</dd>
</dl>
<dl>
<dt><img src="image/04-02.jpg"></dt>
<dd class="word">Life is like a cup of tea, let people lead a person to endless aftertastes. You again good taste, it will always have a different taste, different people will have different taste more.</dd>
</dl>
</div>
<div class="clear"></div>
</div>
</div>

</div>
<!--底部-->
<div class=footer>
© 2019 feihong.me 粤ICP备13046642号
</div>
</body>
</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
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
*{
padding: 0;
margin: 0;
}
.header{
width: 100%;
height: 100px;
/*background-color: #eee;*/
}
.header img{
width: 300px;
height:85px;
padding-left: 100px;
padding-top: 8px;
}
.header .logo{
float: left;
}
.header .nav{
float: right;
}
.header .nav ul{
padding-right: 100px;
}
.header .nav ul li{
float: left;
list-style: none;
width: 80px;
height: 100px;
line-height: 100px;
font-size: 15px;
font-weight: bolder;
color: #7D7D7D;
}
.main .top{
width: 100%;
height: 600px;
}
.main .top img{
width: 100%;
height: 600px;
}
.main .topLayer{
position: absolute;
top: 100px;
left: 0;
background-color: #000;
width: 100%;
height: 600px;
opacity: 0.5;
}
.main .topLayer-top{
width: 500px;
height: 300px;
/*background-color: blue;*/
position: absolute;
top: 400px;
margin-top: -150px;
z-index: 2;
right: 50%;
margin-right: -250px;
}
.main .topLayer-top .word{
padding-top: 100px;
color: #fff;
font-size: 45px;
font-weight: bolder;
text-align: center;
font-family: "微软雅黑";
}
.main .topLayer-top button{
width: 200px;
height: 60px;
margin-top: 50px;
color: #fff;
background-color: #f5704f;
font-family: "微软雅黑";
text-align: center;
font-weight: bolder;
font-size:14px;
border-radius: 8px;
margin-left: 150px;
}
.main .middle{
width: 1000px;
margin: 0 auto;
}
.main .middle .m-top .comment{
float: left;
width: 33.3%;
padding-top: 50px;
text-align: center;
}
.main .middle .m-top .comment .comm{
font-size: 20px;
color:#7d7c7f;
font-weight: bold;
padding-top: 20px;

}
.main .middle .m-top .comment img{
width: 100px;
height: 100px;
}
.main .middle .m-middle{
font-size: 22px;
color: #e19796;
font-weight: bold;
padding-top: 50px;
font-style: italic;
text-align: center;
padding-bottom: 50px;
}
.clear{
clear: both;
}
.main .middle .m-bottom .m-com{
float: left;
/*width: 33.3%;*/
padding: 10px;
text-align: center;
font-size: 20px;
font-weight: bold;


}
.main .middle .m-bottom .m-com img{
width: 310px;
height:260px
}
.main .middle .m-bottom .m-com .des1{
color: #7d7d7f;
padding-top: 20px;

}
.main .middle .m-bottom .m-com .des2{
padding-top: 10px;
color: #bdbdbc;
}
.main .bottom{
background-color: #F9F9F9;
}
.main .bottom .content{
width: 1000px;
margin: 0 auto;
}
.main .bottom .content .title{
text-align: center;
font-size: 20px;
font-weight: bold;
color: #7d7c7f;
font-family: "微软雅黑";
padding-top:50px;
padding-bottom: 50px;
}
.main .bottom .content .pic-content dl{
float: left;
width: 470px;
margin: 10px 12px;
}
.main .bottom .content .pic-content dl img{
width: 470px;
height: 460px;
}
.main .bottom .content .pic-content dl .word{
padding-top: 20px;
font-size: 20px;
font-weight: bold;
color: #7d7c7f;
padding-bottom: 50px;
}
.footer{
width: 100%;
height: 100px;
background-color: #292c35;
color: #ffffff;
font-size: 15px;
/*font-weight: bold;*/
font-family: "微软雅黑";
text-align: center;
line-height: 100px;

}
-------------本文结束感谢您的阅读-------------