ZhangYang's Blog

【实战】IFE的HTML及CSS模拟报纸及产品官网布局

HTML及CSS模拟报纸

任务目的

深入掌握CSS中的字体、背景、颜色等属性的设置

进一步练习CSS布局

任务描述

参考 PDS设计稿(点击下载),实现页面开发,要求实现效果与 样例(点击查看) 基本一致

页面中的各字体大小,内外边距等可参看 标注图(点击查看)

页面宽度固定

注意事项

只需要完成HTML,CSS代码编写,不需要写JavaScript

设计稿中的图片、文案均可自行设定

在Chrome中完美实现符合标注中的各项说明

有能力的同学可以尝试跨浏览器的兼容性

有能力的同学可以在实现一遍后尝试用less, sass或者stylus等再实现一次

参考资料

MDN HTML入门

MDN 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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
// index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>task6</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="clearfix">
<div class="header-logo">ife.baidu.com</div>
<span class="header-time">2016.03</span>
</header>
<section id="about" class="clearfix">
<aside>
<p class="bigLetter"><span>ABOUT</span></p>
<p class="bigLetter"><span>TECHNOLOGE</span></p>
<p class="content">About technologe about technologe about technologe</p>
<h3 class="big700">700</h3>
<div class="content3">
<span class="red3">3.2</span>
<span class="wraper">
<span class="redcss">CSS</span>
<span>cssssccsccscssc</span>
</div>
</h4>
</aside>
<article>
<div class="about-img">
<img src="http://img3.3lian.com/2013/c3/75/d/10.jpg" alt="轮播图">
<div class="shadow-left"></div>
<div class="shadow-right"></div>
</div>
<div class="introduce clearfix">
<div class="what">
<h2><span class="greenH2">What</span></h2>
<p>
前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端
</p>
</div>
<div class="what">
<h2><span class="yellowH2">When</span></h2>
<p>
前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端
</p>
</div>
<div class="what">
<h2><span class="redH2">How</span></h2>
<p>
前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端
</p>
<div class="whatPrecent">
<ul>
<li>What--------<span class="precent">40%</span></li>
<li>What--------<span class="precent">30%</span></li>
<li>What--------<span class="precent">30%</span></li>
</ul>
</div>
</div>
</div>
</article>
</section>
<section id="technologe" class="clearfix">
<div class="technologe-left">
<h1><span class="yellowLetter">THE</span>TECHNOLOGE OF FRONT</h1>
<h2>前端技术领域</h2>
<p>前端前端前端前端前端前端前端前端前端前端前前端前前端前端前端前端前端前端前端前端前端前端前端前端前</p>
<img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1827139362,3355305400&fm=27&gp=0.jpg" alt="猫图片" width=200 height=300>
<p>前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端前端。</p>
</div>
<div class="technologe-right">
<div class="technologe-top">
<img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1538129588585&di=3109d5c44b646da00ef9e17623a561c1&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fpic%2F3%2F05%2Fc4361318222.jpg%3Fdown" alt="技术图" width=450 height=250>
<div class="shadow-img">
<h2>前端技术<span>前端技术前端技术</span></h2>
</div>
</div>
<div class="technologe-bottom">
<ul>
<li>▲前端前端前端前端前端前端前端前端...................................前端</li>
<li>▲前端前端前端前端前端前端前端前端...................................前端</li>
<li>▲前端前端前端前端前端前端前端前端...................................前端</li>
</ul>
<div class="technologe-data clearfix">
<div class="data-left">
<h2>0</h2>
<div class="detail">
<h3>ONE TWO</h3>
<h3>THREE FORE FIVE</h3>
<p>hello world hello world hello world</p>
</div>
</div>
<div class="data-right">
<p><span>“</span>world hello word hello word hello word hello word hello word hello word hello word hello word hello word<span>”</span></p>
</div>
</div>
</div>
</div>
</section>
<footer>ife.baidu.com</footer>
</body>
</html>
//style.css
/*格式化样式-----------------------*/
*{
margin: 0;
padding: 0;
}
ul{
list-style: none;
}
ul a{
text-decoration: none;
}
.clearfix::after{
content: '';
clear: both;
display: block;
}
html{
background-color: rgb(14,14,14);
}
body{
width: 980px;
margin: 0 auto;
padding: 0 40px;
background-color: white;
}
/*头部样式--------------------------*/
header{
border-bottom: 2px solid rgb(146,146,146);
margin-bottom: 40px;
}
header .header-logo{
float: left;
color: white;
font-size: 14px;
width: 120px;
padding-top: 40px;
background-color: rgb(213,93,92);
}
header .header-time{
float: right;
padding-top: 34px;
color: rgb(213,93,92);
}
/*关于部分样式--------------------------*/
#about aside{
float: right;
width: 250px;
border-top: 2px solid rgb(205,128,146);
padding-top: 10px;
}
#about aside .bigLetter:first-letter{
font-size: 30px;
}
#about aside .bigLetter span{
border-bottom: 2px solid gray;
}
#about aside .content{
font-size: 14px;
color: rgb(103,103,103);
}
#about aside .big700{
font-size: 120px;
color: rgb(117,184,107);
}
#about aside .content3 .red3{
color: rgb(202,130,146);
font-size: 60px;
}
#about aside .content3 .wraper{
display: inline-block;
width: 100px;
color: #ccc;
}
#about aside .content3 .wraper .redcss{
font-size: 16px;
color: rgb(202,130,146);
}
#about article{
margin-right: 300px;
}
#about article .about-img{
position: relative;
}
#about article .about-img img{
width: 100%;
height: 300px;
}
#about article .about-img .shadow-left{
position: absolute;
left: 0;
top: 0;
width: 30%;
height: 98.8%;
background-color: green;
opacity: 0.3;
}
#about article .about-img .shadow-right{
position: absolute;
right: 0;
top: 0;
width: 30%;
height: 98.8%;
background-color: red;
opacity: 0.3;
}
#about article .introduce{
margin-top: 50px;
}
#about article .introduce .what{
float: left;
width: 200px;
margin-right: 25px;
}
#about article .introduce .what p{
font-size: 14px;
margin-top: 10px;
color: rgb(188,188,188);
}
#about article .introduce .what .whatPrecent{
margin-top: 10px;
}
#about article .introduce .what .whatPrecent li{
line-height: 25px;
}
#about article .introduce .what .whatPrecent .precent{
color: rgb(235,185,183);
}
#about article .introduce .what:last-of-type p{
line-height: 26px;
}
#about article .introduce .what .greenH2{
color: rgb(64,140,90);
border-bottom: 2px solid rgb(64,140,90);
}
#about article .introduce .what .yellowH2{
color: rgb(212,150,90);
border-bottom: 2px solid rgb(212,150,90);
}
#about article .introduce .what .redH2{
color: rgb(204,118,130);
border-bottom: 2px solid rgb(204,118,130);
}
/*前端技术领域部分样式--------------------------*/
#technologe {
margin-top: 60px;
border-bottom: 1px solid gray;
}
#technologe .technologe-left{
float: left;
width: 49%;
margin-bottom: 40px;
}
#technologe .technologe-left h1{
color: rgb(17,70,108);
font-size: 35px;
}
#technologe .technologe-left h2{
border-bottom: 2px solid rgb(17,70,108);
color: rgb(17,70,108);
font-size: 35px;
padding-bottom: 10px;
margin-bottom: 20px;
}
#technologe .technologe-left img{
margin: 20px 0px 0px 20px;
float: right;
}
#technologe .technologe-left p{
color: rgb(188,188,188);
}
#technologe .technologe-left p:first-of-type:first-letter{
font-size: 80px;
color: rgb(245,227,40);
float: left;
margin-right: 10px;
margin-top: -15px;
}
#technologe .technologe-left .yellowLetter{
font-size: 70px;
color: rgb(245,227,40);
font-style: italic;
margin-right: 40px;
}
#technologe .technologe-right{
float: right;
width: 49%;
}
#technologe .technologe-right .technologe-top img{
width: 100%;
}
#technologe .technologe-right .technologe-top{
position: relative;
}
#technologe .technologe-right .technologe-top .shadow-img{
position: absolute;
padding: 10px 0;
bottom: 3px;
width: 100%;
background-color: rgba(0,0,0,0.4);
}
#technologe .technologe-right .technologe-top .shadow-img h2{
position: relative;
padding: 4px 0;
padding-left: 20px;
margin-left: 30px;
color: white;
font-size: 25px;
border-left: 3px solid rgb(144,177,106);
}
#technologe .technologe-right .technologe-top .shadow-img span{
color: rgb(144,177,106);
font-size: 14px;
font-style: italic;
}
#technologe .technologe-right .technologe-bottom{
background-color: rgb(238,238,214);
padding: 20px;
margin-top: 30px;
padding-top: 40px;
padding-bottom: 0;
}
#technologe .technologe-right .technologe-bottom li{
line-height: 40px;
}
#technologe .technologe-right .technologe-bottom .data-left{
float: left;
width: 60%;
padding: 40px 0;
background-color: rgb(214,93,93);
margin-left: -20px;
}
#technologe .technologe-right .technologe-bottom .data-left h2{
font-size: 100px;
display: inline-block;
color: white;
}
#technologe .technologe-right .technologe-bottom .data-left .detail{
width: 180px;
display: inline-block;
color: white;
border-left: 2px solid white;
padding-left: 10px;
}
#technologe .technologe-right .technologe-bottom .data-right{
float: right;
width: 40%;
}
#technologe .technologe-right .technologe-bottom .data-right p{
text-indent: 4em;
position: relative;
}
#technologe .technologe-right .technologe-bottom .data-right span:first-of-type{
position: absolute;
left: -127px;
top: -27px;
color: rgb(214,93,93);
font-size: 100px;
}
#technologe .technologe-right .technologe-bottom .data-right span:last-of-type{
position: absolute;
left: 65px;
top: 82px;
color: rgb(214,93,93);
font-size: 100px;
}
/*尾部部分样式--------------------------*/
footer{
color: rgb(214,93,93);
font-size: 14px;
text-align: right;
padding-bottom: 40px;
}

实现常见的技术产品官网的页面架构及样式布局

任务目的

通过实现一个常见的技术产品官网,加深对于HTML,CSS的实战能力

学习掌握如何在没有标注的情况下实现设计稿到页面的精确转变

任务描述

通过HTML及CSS实现设计稿 设计稿PSD文件(点击下载),效果如 效果图(点击打开)

设计稿是有一定宽度的,这个宽度为页面的最小宽度,也就是说,当浏览器窗口宽度小于设计稿宽度时,允许出现横向滚动条,页面内容宽度保持不变,但是当浏览器窗口宽度大于设计稿宽度时,页面部分内容的宽度应该保持和浏览器窗口宽度一致,具体哪些部分题目不做具体指明,看看大家的判断如何。

注意事项

只需要完成HTML,CSS代码编写,不需要写JavaScript

设计稿中的图片、文案均可自行设定

在Chrome中完美实现与设计稿的各项字体、布局、内外边距等样式

有能力的同学可以尝试跨浏览器的兼容性

有能力的同学可以在实现一遍后尝试用less, sass或者stylus等再实现一次

参考资料

MDN HTML入门

MDN 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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
// index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>task7</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://chenbujuan.github.io/IFE-FirstStage-Task7/css/font-awesome.min.css">
</head>
<body>
<header class="clearfix">
<div class="header-left">
<img src="https://chenbujuan.github.io/IFE-FirstStage-Task7/images/icon-1.png" alt="">
<span>新世界</span>
</div>
<nav>
<ul class="clearfix">
<li><a href="#" class="active">首页</a></li>
<li><a href="#">最新活动</a></li>
<li><a href="#">项目介绍</a></li>
<li><a href="#">爱心社区</a></li>
<li><a href="#">关于我们</a></li>
</ul>
</nav>
<div class="header-right">
<img src="https://chenbujuan.github.io/IFE-FirstStage-Task7/images/icon-2.jpg" alt="">
<span>登录</span>
</div>
</header>
<section class="banner">
<div class="message">
<p>Time of new life</p>
<p>新时代,年轻的人们让我们一起</p>
<p>体验新生活,享受新生活</p>
<span>开始体验</span>
</div>
</section>
<section class="introduce">
<ul>
<li>
<img src="https://chenbujuan.github.io/IFE-FirstStage-Task7/images/icon-3.jpg" alt="">
<p>打造全新世界观,让你更<br>爱你的生活</p>
</li>
<li>
<img src="https://chenbujuan.github.io/IFE-FirstStage-Task7/images/icon-4.jpg" alt="">
<p>丰富多彩的公益活动,发<br>挥新世界的主人公意识</p>
</li>
<li>
<img src="https://chenbujuan.github.io/IFE-FirstStage-Task7/images/icon-5.jpg" alt="">
<p>时尚的新理念,超前体验<br>未知的生活</p>
</li>
<li>
<img src="https://chenbujuan.github.io/IFE-FirstStage-Task7/images/icon-6.jpg" alt="">
<p>完善的培养机制,培养你<br>全新的世界观</p>
</li>
</ul>
</section>
<section class="recommend">
<img src="https://chenbujuan.github.io/IFE-FirstStage-Task7/images/icon-1.png" alt="">
<p>关于新世界,你不知道的还有什么?</p>
</section>
<section class="search">
<div class="message">
<h2>查找新世界城市活动信息</h2>
<div class="hr"></div>
<p>每个城市都有不同的活动信息,请自助查询您所需要了解的城市</p>
</div>
<div class="area">
<input type="text" placeholder="中国" class="sel">
<input type="text" placeholder="省份" class="sel">
<ul>
<li>北京市</li>
<li>天津市</li>
<li>河北省</li>
<li>陕西省</li>
<li>内蒙古自治区</li>
<li>辽宁省</li>
</ul>
<input type="text" placeholder="城市" class="sel">
<input type="submit" value="搜索" class="sub">
</div>
</section>
<section class="show">
<div class="cell">
<div class="img">
<img src="https://chenbujuan.github.io/IFE-FirstStage-Task7/images/pic03.jpg" alt="">
</div>
<div class="mes">
<h5>北京活动</h5>
<p>新社区大联盟</p>
</div>
</div>
<div class="cell">
<div class="mes">
<h1>上海活动</h1>
<p>夜上海新景观探索</p>
</div>
<div class="img">
<img src="https://chenbujuan.github.io/IFE-FirstStage-Task7/images/pic04.jpg" alt="">
</div>
</div>
<div class="cell">
<div class="img">
<img src="https://chenbujuan.github.io/IFE-FirstStage-Task7/images/pic05.jpg" alt="">
</div>
<div class="mes">
<p>深圳活动</p>
<p>全新海岸线观点站</p>
</div>
</div>
<div class="cell">
<div class="img">
<img src="https://chenbujuan.github.io/IFE-FirstStage-Task7/images/pic06.jpg" alt="">
</div>
<div class="mes">
<p>香港活动</p>
<p>奢侈消费大派送</p>
</div>
</div>
</section>
<section class="items">
<div class="items-top clearfix">
<div class="left">
<div class="mes">
<p>新世界</p>
<p>TIME</p>
<p>@新世界-北京</p>
<p>2016.04.01</p>
</div>
</div>
<div class="right">
<h3>新世界/<span>01</span></h3>
<p>新世界是个新世界新世界是个新世界新世界是个新世界新世界是个新世界新世界是个新世界新世界是个新世界新世界是个新世界新世界是个新世界新世界是个新世界新世界是个新世界新世界是个新世界</p>
<button>更多详情</button>
<div class="point">
<ul class="clearfix">
<li></li>
<li></li>
<li></li>
</ul>
</div>
<span class="triangle"></span>
</div>
</div>
<div class="items-bottom clearfix">
<div class="left">
<p>新时代</p>
<p>关于爱生活的我们</p>
<div class="hr"></div>
<button>查看更多</button>
</div>
<div class="middle">
<p>新时代</p>
<p>关于爱生活的我们</p>
<div class="hr"></div>
<button>查看更多</button>
</div>
<div class="right">
<div class="shadow"></div>
<span class="triangle"></span>
</div>
</div>
</section>
<section class="volunteer">
<h2>成为我们的志愿者</h2>
<div class="hr"></div>
<p>新世界的大家庭需要每一个爱生活的人的加入,如果你够年轻,有梦想,有激情那就不要犹豫,快来加入我们,成为改变所有人生活的人</p>
<div class="submit clearfix">
<div class="protocol">
<ul>
<li>
<h5>新世界志愿者协议</h5>
<p>加入新世界志愿者的人员必须遵守中华人民共和国的相关法律法规,并且本着平等自愿的原则</p>
<span>more</span>
</li>
<li>
<h5>新世界志愿者协议</h5>
<p>加入新世界志愿者的人员必须遵守中华人民共和国的相关法律</p>
<span>more</span>
</li>
<li>
<h5>新世界志愿者协议</h5>
<p>新世界志愿者享受新世界内部所有资源共享的权利</p>
<span>more</span>
</li>
<li>
<h5>更多条款</h5>
<span>more</span>
</li>
</ul>
</div>
<div class="form">
<input type="text" value="姓名">
<input type="text" value="年龄">
<input type="text" value="联系方式">
<input type="text" value="联系地址">
<textarea cols="30" rows="10">请简单描述您梦想的生活</textarea>
<input type="submit" value="提交申请">
</div>
</div>
</section>
<footer>
<div class="contact">
<h3>联系我们</h3>
<p>为了更好的获取我们最新的产品资讯,您可以留下您的电子邮箱快速订阅我们的产品资讯<br>也可以通过以下任何方式关注我们的动态</p>
<input type="text" placeholder="zy343134464@163.com"><input type="submit" value="提交">
<div class="icon">
<i class="fa fa-qq"></i>
<i class="fa fa-weibo"></i>
<i class="fa fa-twitter"></i>
<i class="fa fa-globe"></i>
</div>
</div>
<div class="bottom">
@2016新世界
</div>
</footer>
</body>
</html>
// style.css
/*初始化样式----------------*/
*{
margin: 0;
padding: 0;
}
ul{
list-style: none;
}
.clearfix::after{
content: '';
display: block;
clear: both;
}
/*导航条样式----------------*/
header{
line-height: 60px;
}
.header-left{
float: left;
margin-left: 120px;
line-height: 56px;
}
.header-left img{
position: relative;
top: 10px;
width: 36px;
height: 36px;
}
.header-left span{
font-size: 26px;
margin-left: 28px;
}
nav{
float: left;
line-height: 28px;
position:relative;
left: 40%;
margin-left: -300px;
}
nav ul{
padding-top: 14px;
padding-bottom: 14px;
}
nav ul li{
float: left;
}
nav ul li a{
text-decoration: none;
font-size: 16px;
color: #534141;
margin-left: 20px;
margin-right: 20px;
padding-top: 18px;
padding-bottom: 18px;
}
nav ul li a:hover{
border-bottom: 4px solid red;
}
nav ul li a.active{
color: red;
border-bottom: 4px solid red;
}
.header-right{
float: right;
line-height: 60px;
}
.header-right img{
position: relative;
top: 4px;
}
.header-right span{
font-size: 16px;
color: red;
padding-right: 120px;
padding-left: 40px;
}
/*banner样式----------------*/
.banner{
position: relative;
height: 650px;
background: url(https://chenbujuan.github.io/IFE-FirstStage-Task7/images/pic01.jpg) no-repeat;
background-size: cover;
}
.banner .message{
position: absolute;
left: 80px;
top: 200px;
}
.banner .message p{
color: #fff;
font-size: 22px;
}
.banner .message p:first-child{
font-size: 60px;
margin-bottom: 20px;
}
.banner .message p:last-of-type{
margin-bottom: 60px;
}
.banner .message span{
display: inline-block;
width:300px;
height: 60px;
background-color: #E53C3C;
font-size: 28px;
color: #fff;
line-height: 60px;
text-align: center;
}
/*introduce样式----------------*/
.introduce{
margin-top: 40px;
margin-bottom: 40px;
}
.introduce ul li{
width: 20%;
margin-left: 40px;
margin-right: 40px;
text-align: center;
display: inline-block;
}
.introduce ul li img{
margin-top: 20px;
margin-bottom: 20px;
}
.introduce ul li p{
border-right: 2px solid black;
}
/*recommend样式----------------*/
.recommend{
text-align: center;
background-color: #EDEAEA;
padding-top: 40px;
padding-bottom: 80px;
}
.recommend img{
width: 90px;
height: 90px;
margin-top: 40px;
margin-bottom: 80px;
}
.recommend p{
font-size: 50px;
}
/*search样式----------------*/
.search{
position: relative;
height: 300px;
background: url(http://cherry037.github.io/task7/images/map.jpg);
background-size: cover;
text-align: center;
padding-top: 80px;
}
.search .message{
color: #fff;
}
.search .message .hr{
margin: 0 auto;
width: 30px;
height: 2px;
margin-top: 10px;
margin-bottom: 20px;
background-color: #fff;
}
.search .area .sel{
width: 225px;
line-height: 36px;
border: none;
margin-right: 22px;
padding-left: 12px;
margin-top: 40px;
background: url(https://cherry037.github.io/task7/images/red-arrow.png) no-repeat 210px;
background-color: #fff;
}
.search .area .sub{
width: 225px;
line-height: 36px;
border: none;
background-color: #BE4F48;
font-size: 18px;
color: #fff;
letter-spacing: 30px;
padding-left: 20px;
cursor: pointer;
transition: background-color 0.6s;
}
.search .area .sub:hover{
background-color: #E31212;
}
.search .area ul{
position: absolute;
background-color: #e3e3e4;
left: 706px;
font-size: 12px;
color: #4f5152;
border: 1px solid #be4e48;
}
.search .area ul li{
width: 236px;
line-height: 36px;
}
.search .area ul li:hover{
color: #fff;
background: url(https://cherry037.github.io/task7/images/swosh.png) no-repeat 10px #be4e48;
}
/*show样式----------------*/
.show{
background-color: #f7f7f7;
text-align: center;
}
.show .cell{
display: inline-block;
margin: 100px;
}
.show .cell .mes p{
font-size: 12px;
margin-top: 10px;
margin-bottom: 10px;
color: #B3AFAC;
}
/*item样式----------------*/
.items{
text-align: center;
}
.items .items-top .left{
float: left;
width: 64%;
background: url(http://cherry037.github.io/task7/images/middle-left.jpg) no-repeat;
background-size: cover;
height: 575px;
}
.items .items-top .left .mes p{
color: #fff;
}
.items .items-top .left .mes p:nth-child(1){
font-size: 50px;
padding-top: 120px;
}
.items .items-top .left .mes p:nth-child(2){
font-size: 160px;
}
.items .items-top .left .mes p:nth-child(3){
font-size: 26px;
}
.items .items-top .left .mes p:nth-child(4){
font-size: 26px;
}
.items .items-top .right{
position: relative;
float: left;
width: 30%;
padding: 50px;
padding-top: 160px;
}
.items .items-top .right h3{
padding-bottom: 20px;
font-size: 30px;
}
.items .items-top .right h3 span{
color: #e74f4d;
}
.items .items-top .right p{
text-align: left;
line-height: 32px;
font-size: 14px;
color: #aaa;
margin-bottom: 46px;
}
.items .items-top .right button{
width: 106px;
height: 34px;
color: #e74f4d;
border: 1px solid #e74f4d;
background-color: #fff;
}
.items .items-top .right .point{
margin-top: 60px;
}
.items .items-top .right .point li{
display: inline-block;
margin-left: 6px;
margin-right: 6px;
width: 10px;
height: 10px;
border-radius: 50%;
border: 1px solid gray;
}
.items .items-top .right .point li:nth-child(1){
background-color: gray;
}
.items .items-top .right .triangle{
width: 0;
height: 0;
border-right: 26px solid #ffffff;
border-bottom: 40px solid transparent;
border-top: 40px solid transparent;
position: absolute;
top: 245px;
left: -26px;
}
.items .items-bottom .left{
width: 33%;
float: left;
background-color: #e74f4d;
padding-top: 160px;
padding-bottom: 160px;
}
.items .items-bottom .left p{
font-size: 20px;
color: #fff;
}
.items .items-bottom .left button{
background-color: #e74f4d;
color: #fff;
border: 1px solid #fff;
width: 170px;
height: 42px;
font-size: 20px;
}
.items .items-bottom .left .hr{
width: 30px;
height: 2px;
background-color: #fff;
margin: 30px auto;
}
.items .items-bottom .middle{
width: 33.3%;
float: left;
background-color: #fff;
padding-top: 160px;
padding-bottom: 160px;
}
.items .items-bottom .middle p{
font-size: 20px;
}
.items .items-bottom .middle button{
background-color: #fff;
color: #e74f4d;
border: 1px solid #e74f4d;
width: 170px;
height: 42px;
font-size: 20px;
}
.items .items-bottom .middle .hr{
width: 33.3px;
height: 2px;
background-color: gray;
margin: 30px auto;
}
.items .items-bottom .right{
position: relative;
width: 33.6%;
float: left;
height: 476px;
background: url(http://cherry037.github.io/task7/images/train.png) no-repeat;
background-size: cover;
}
.items .items-bottom .right .shadow{
background-color: rgba(0,0,0,0.5);
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
}
.items .items-bottom .right .triangle{
width: 0;
height: 0;
border-left: 26px solid #ffffff;
border-bottom: 20px solid transparent;
border-top: 20px solid transparent;
position: absolute;
top: 245px;
left: 0;
}
/*volunteer样式----------------*/
.volunteer{
padding-top: 160px;
text-align: center;
}
.volunteer .hr{
margin: 10px auto;
width: 30px;
height: 2px;
background-color: #e74f4d;
}
.volunteer > p{
color: #aaa;
font-size: 12px;
margin-bottom: 100px;
}
.volunteer .submit{
text-align: left;
margin: 0 400px;
padding-bottom: 120px;
}
.volunteer .submit .protocol{
float: left;
width: 30%;
}
.volunteer .submit .protocol p{
margin-top: 20px;
font-size: 12px;
line-height: 22px;
color: #9a9b9b;
}
.volunteer .submit .protocol span{
display: block;
text-align: right;
}
.volunteer .submit .form{
text-align: left;
float: left;
width: 64%;
margin-left: 60px;
}
.volunteer .submit .form input{
width: 40%;
margin: 0 20px;
background-color: #ededee;
height: 40px;
border: none;
margin-bottom: 10px;
padding-left: 10px;
}
.volunteer .submit .form textarea{
width: 87.6%;
margin-left: 20px;
background-color: #ededee;
border: none;
padding-left: 10px;
padding-top: 10px;
}
.volunteer .submit .form input:last-child{
margin-top: 10px;
width: 89%;
font-size: 16px;
}
/*footer样式----------------*/
footer .contact{
height: 380px;
background-color: #33363F;
text-align: center;
color: #fff;
padding-top: 100px;
}
footer .contact input:nth-of-type(1){
background-color: #fff;
line-height: 40px;
width: 26%;
padding-left: 10px;
}
footer .contact input:nth-of-type(2){
background-color: #75757F;
width: 6%;
padding-left: 10px;
color: #fff;
border: none;
line-height: 44px;
}
footer .contact p{
margin-top: 20px;
margin-bottom: 40px;
}
footer .contact .icon{
margin-top: 40px;
font-size: 30px;
}
footer .contact .icon i{
margin-left: 20px;
margin-right: 20px;
}
footer .bottom{
font-size: 14px;
color: #fff;
background-color: #30303A;
line-height: 80px;
padding-left: 80px;
}