-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcss3-feture-query.html
71 lines (69 loc) · 1.85 KB
/
css3-feture-query.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>css3 feture query</title>
<style media="screen">
:root {
--body-color: red;
--header-color: #ffd533;
--main-color: #fff;
--footer-color: #616262;
}
* {
margin: 0;
padding: 0;
}
body {
background: var(--theme-color);
}
.hg__header {
background: var(--header-color);
}
.hg__main {
background: var(--main-color);
}
.hg__footer {
background: var(--footer-color);
}
.hg__header { grid-area: header; }
.hg__footer { grid-area: footer; }
.hg__main { grid-area: main; }
.hg__left { grid-area: navigation; }
.hg__right { grid-area: ads; }
.hg {
display: grid;
grid-template-areas: "header header header"
"navigation main ads"
"footer footer footer";
grid-template-columns: 150px 1fr 150px;
grid-template-rows: 100px
1fr
30px;
min-height: 100vh;
}
@media screen and (max-width: 600px) {
.hg {
grid-template-areas: "header"
"navigation"
"main"
"ads"
"footer";
grid-template-columns: 100%;
grid-template-rows: 100px
50px
1fr
50px
30px;
}
}
</style>
</head>
<body class="hg">
<header class="hg__header">Title</header>
<main class="hg__main">Content</main>
<aside class="hg__left">Menu</aside>
<aside class="hg__right">Ads</aside>
<footer class="hg__footer">Footer</footer>
</body>
</html>