Skip to content

Commit de9b05b

Browse files
committed
Criando menu hamburguer
1 parent b4af5d1 commit de9b05b

File tree

2 files changed

+110
-2
lines changed

2 files changed

+110
-2
lines changed
Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,96 @@
11
@charset "UTF-8";
22

3-
body {
3+
* {
4+
margin: 0;
5+
padding: 0;
6+
font-family: Arial, Helvetica, sans-serif;
7+
}
8+
9+
ul{
10+
list-style-type: none;
11+
}
12+
13+
body, html {
414
background-color: lightgrey;
15+
}
16+
17+
header {
18+
background-color: gray;
19+
}
20+
21+
header > h1 {
22+
padding: 10px;
23+
text-align: center;
24+
}
25+
26+
span#burguer {
27+
background-color: rgb(36, 36, 36);
28+
color: white;
29+
display: block;
30+
text-align: center;
31+
padding: 10px;
32+
}
33+
34+
span#burguer:hover {
35+
background-color: white;
36+
color: black;
37+
}
38+
39+
nav {
40+
display: none;
41+
}
42+
43+
nav > ul > li > a {
44+
display: block;
45+
padding: 10px;
46+
text-decoration: none;
47+
text-align: center;
48+
background-color: rgb(78, 78, 78);
49+
color: white;
50+
border-top: 2px solid gray;
51+
}
52+
53+
nav > ul > li > a:hover {
54+
background-color: rgb(201, 198, 198);
55+
font-weight: bold;
56+
color: black;
57+
}
58+
59+
main {
60+
margin: auto;
61+
margin-top: 10px;
62+
width: 90vw;
63+
background-color: white;
64+
padding: 10px;
65+
border-radius: 10px;
66+
box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.459);
67+
}
68+
69+
article > h2 {
70+
padding-bottom: 20px;
71+
}
72+
73+
article > p {
74+
text-align: justify;
75+
margin-bottom: 10px;
76+
text-indent: 30px;
77+
}
78+
79+
footer {
80+
background-color: black;
81+
margin-top: 20px;
82+
padding: 15px;
83+
color: white;
84+
text-align: center;
85+
text-decoration: none;
86+
}
87+
88+
footer > p > a {
89+
color: white;
90+
font-weight: bolder;
91+
text-decoration: underline;
92+
}
93+
94+
footer > p > a:hover {
95+
color: red;
596
}

exercicios/ex027/mq005/index.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>Media Query</title>
7+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&icon_names=menu" />
78
<link rel="stylesheet" href="estilos/style.css">
89
</head>
910
<body>
1011
<header>
1112
<h1>Meu Site</h1>
12-
<nav>
13+
<span class="material-symbols-outlined" id="burguer" onclick="clickMenu()">
14+
menu
15+
</span>
16+
<nav id="itens">
1317
<ul>
1418
<li><a href="#">Opção 1</a></li>
1519
<li><a href="#">Opção 2</a></li>
@@ -29,5 +33,18 @@ <h2>Testando Media Queries</h2>
2933
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Suscipit, ullam corrupti soluta excepturi at ab, ad repellat minima aliquam ut tempora? Ullam placeat deserunt voluptatum architecto esse, nulla laboriosam voluptas.</p>
3034
</article>
3135
</main>
36+
<footer>
37+
<p>Este site foi criado por <a href="https://github.com/emiliosarges" target="_blank">Emílio Sarges</a> para a plataforma <a href="https://www.estudonauta.com/" target="_blank">Estudonauta</a></p>
38+
</footer>
39+
<script>
40+
function clickMenu() {
41+
if (itens.style.display == 'block'){
42+
itens.style.display = 'none'
43+
} else {
44+
itens.style.display = 'block'
45+
}
46+
47+
}
48+
</script>
3249
</body>
3350
</html>

0 commit comments

Comments
 (0)