-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout02.html
More file actions
48 lines (45 loc) · 1.34 KB
/
layout02.html
File metadata and controls
48 lines (45 loc) · 1.34 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
<!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 02</title>
<style>
* {margin: 0; padding: 0;}
#wrap {width: 100%;}
header {width: 100%; height: 150px; background: #81c784;}
aside {float: left; width: 30%; height: 700px; background: #66bb6a;}
section {float: left; width: 40%; height: 700px; background: #4caf50;}
article {float: left; width: 30%; height: 700px; background: #43a047;}
footer {clear: both; width: 100%; height: 150px; background: #388e3c;}
/* screen width 0 - 1200px */
@media (max-width: 1220px){
aside {width: 40%;}
section {width: 60%;}
article {clear: both; float: none; width: 100%; height: 300px;}
}
/* screen width 0 - 768px */
@media (max-width: 768px){
aside {float: none; width: 100%; height: 300px;}
section {float: none; width: 100%; height: 300px;}
}
/* screen width 0 - 480px */
@media (max-width: 480px){
header {height: 300px;}
aside {height: 200px;}
section {height: 200px;}
article {height: 200px;}
}
</style>
</head>
<body>
<div id="wrap">
<header></header>
<aside></aside>
<section></section>
<article></article>
<footer></footer>
</div>
</body>
</html>