-
Notifications
You must be signed in to change notification settings - Fork 0
/
flexbox.html
67 lines (54 loc) · 1.28 KB
/
flexbox.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>学习 Laravel ---- 模板继承</title>
<style type="text/css">
* {
font-family: Georgia, serif;
color: #333;
}
.container {
display: flex;
flex-wrap: wrap;
}
header, main, footer {
display: flex;
flex-basis: 100%;
background-color: lightblue;
}
header, footer {
min-height: 38px;
line-height: 38px;
}
main {
justify-content: space-between;
min-height: 300px;
}
main > article {
flex-basis: 68%;
background-color: rgba(255,255,255,.3);
}
main > aside {
flex-basis: 30%;
background-color: rgba(0,0,0,.3);
}
@media (max-width: 768px) {
main > article {
flex-basis: 100%
}
main > aside {
display: none;
}
}
</style>
</head>
<body class="container">
<header>header</header>
<main>
<article>article</article>
<aside>aside</aside>
</main>
<footer>(c) footer Copyright</footer>
</body>
</html>