-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout04.html
More file actions
57 lines (54 loc) · 1.53 KB
/
layout04.html
File metadata and controls
57 lines (54 loc) · 1.53 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Layout 04</title>
<style>
* {margin: 0; padding: 0;}
body {background-color: #fffde7;}
#wrap {width: 1200px; margin: 0 auto;}
header {width: 100%; height: 100px; background-color: #ffe082;}
article {width: 100%; height: 300px; background-color: #ffd54f;}
section {overflow: hidden; width: 100%; padding: 5%; width: 90%; background-color: #ffca28;}
section > div {width: 18%; margin: 1%; height: 170px; background-color: #ff9800; float: left; border-radius: 5px;}
footer {width: 100%; height: 100px; background-color: #ffb300;}
/* screen width 0 - 1200px */
@media (max-width: 1220px){
#wrap {width: 100%;}
section > div {width: 23%;}
section > div:nth-child(5n) {display: none;}
}
/* screen width 0 - 768px */
@media (max-width: 768px){
section > div {width: 31.33%;}
section > div:nth-child(5) {display: block;}
}
/* screen width 0 - 480px */
@media (max-width: 480px){
section > div {width: 48%;}
section > div:nth-child(5n) {display: block;}
}
</style>
</head>
<body>
<div id="wrap">
<header></header>
<article></article>
<section>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</section>
<footer></footer>
</div>
</body>
</html>