-
Notifications
You must be signed in to change notification settings - Fork 0
/
index1.html
53 lines (50 loc) · 1.68 KB
/
index1.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
<!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>Responsive Grid</title>
<style>
.container{
display: grid;
grid-template-areas: 'nav nav nav nav'
'aside section section section'
'footer footer footer footer' ;
gap: 15px;
background-color:royalblue;
}
.container >div{
background-color: aqua;
padding: 8rem;
}
@media screen and (max-width:660px){
.container{
display: grid;
grid-template-areas: 'nav nav nav nav'
'aside aside aside aside'
'section section section section'
'footer footer footer footer' ;
gap: 15px;
background-color:royalblue;
}
}
.nav{grid-area: nav;}
.aside{grid-area:aside}
.section{grid-area: section;}
.footer{grid-area: footer;}
</style>
</head>
<body>
<div class="container">
<div class="nav">This is Navbar</div>
<div class="aside">This is aside</div>
<div class="section">This is Section</div>
<div class="footer">This is footer</div>
<!-- <nav class="nav">This is Navbar</nav>
<aside class="aside">This is aside</aside>
<section class="section">This is Section</section>
<footer class="footer">This is footer</footer> -->
</div>
</body>
</html>