-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathadaptive.html
88 lines (85 loc) · 1.18 KB
/
adaptive.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Adaptive Layout Example</title>
<style>
body {
background: #2980b9;
color: #FFF;
font-family: Helvetica;
text-align: center;
margin: 0;
padding: 0;
}
header,
nav,
section {
outline: 1px solid rgba(255, 255, 255, 0.8);
margin-bottom: 10px;
border-radius: 3px;
}
header {
padding: 20px 0;
}
nav,
section {
padding: 200px 0;
}
.wrapper {
width: 400px;
margin: 0 auto;
}
header {
width: 400px;
}
nav {
width: 400px;
}
section {
width: 400px;
}
@media screen and (min-width: 800px) {
.wrapper {
width: 640px;
}
header {
width: 640px;
}
nav,
section {
float: left;
}
nav {
width: 133px;
margin-right: 10px;
}
section {
width: 497px;
}
}
@media screen and (min-width: 1000px) {
.wrapper {
width: 960px;
}
header {
width: 960px;
}
nav {
width: 200px;
}
section {
width: 750px;
}
}
</style>
</head>
<body>
<div class="wrapper">
<h1>Adaptive Layout Example</h1>
<header>HEADER</header>
<nav>NAV</nav>
<section>SECTION</section>
</div>
</body>
</html>