-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout03.html
More file actions
51 lines (48 loc) · 1.55 KB
/
layout03.html
File metadata and controls
51 lines (48 loc) · 1.55 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
<!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 03</title>
<style>
* {margin: 0; padding: 0;}
#wrap {width: 1200px; margin: 0 auto;}
body {background-color: #e3f2fd;}
.header {width: 100%; height: 100px; background: #81d4fa;}
.aside {float: left; width: 30%; height: 900px; background: #4fc3f7;}
.article1 {float: left; width: 70%; height: 300px; background: #29b6f6;}
.article2 {float: left; width: 70%; height: 300px; background: #03a9f4;}
.article3 {float: left; width: 70%; height: 300px; background: #039be5;}
.footer {clear: both; width: 100%; height: 100px; background: #0288d1;}
/* screen width 0 - 1200px */
@media (max-width: 1220px){
#wrap {width: 100%;}
.article1 {height: 450px;}
.article2 {height: 450px;}
.article3 {float: none; clear: both; width: 100%;}
}
/* screen width 0 - 768px */
@media (max-width: 768px){
.aside {width: 100%; height: 300px;}
.article1 {width: 50%;}
.article2 {width: 50%;}
}
/* screen width 0 - 480px */
@media (max-width: 480px){
.article1 {width: 100%;}
.article2 {width: 100%;}
}
</style>
</head>
<body>
<div id="wrap">
<header class="header"></header>
<aside class="aside"></aside>
<section class="article1"></section>
<section class="article2"></section>
<section class="article3"></section>
<footer class="footer"></footer>
</div>
</body>
</html>