Skip to content

Commit

Permalink
new menu version
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Jan 21, 2025
1 parent faa1d79 commit b043d0c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
14 changes: 13 additions & 1 deletion assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -385,4 +385,16 @@ footer {
.down-arrow {
display: none; /* Esconde o ícone da seta para baixo em telas menores que 900px */
}
}
}

.hamburger.open .line:nth-child(1) {
transform: rotate(45deg) translate(5px, 5px); /* Primeira linha */
}

.hamburger.open .line:nth-child(2) {
opacity: 0; /* Oculta a linha do meio */
}

.hamburger.open .line:nth-child(3) {
transform: rotate(-45deg) translate(5px, -5px); /* Terceira linha */
}
5 changes: 4 additions & 1 deletion assets/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ const hamburger = document.getElementById('hamburgerIcon');
const menu = document.querySelector('nav ul');

hamburger.addEventListener('click', function() {
// Alterna a classe 'open' para transformar o hambúrguer em X
hamburger.classList.toggle('open');
// Alterna a exibição do menu
menu.classList.toggle('show');
});
});

0 comments on commit b043d0c

Please sign in to comment.