@scroft001Submitted almost 2 years ago
Andrés Forero
@AndresFelipeForeroAll comments
- @AndresFelipeForeroPosted almost 2 years ago
Hi steve, how are you?
In this project you can try whith around 800px as media-queryx. In this way the page breaks a little less.
Good luck 👍
0 - @AdrianoEscaraboteSubmitted about 2 years ago
👨💻 Hello everyone.
This was a really fun project to do, I really liked the colors in both dark mode and light mode, and I'm very satisfied with the layout structure, it was a great way to practice grid manipulation with Bootstrap!
I have a question for you, how do I make it so that when the burger menu is open, the background is dark?
I added:
- 👨💻 Burguer Menu in the mobile version!
- 🎨 Dark/Light Mode!
Feel free to leave comments on how I can improve my code.
Thanks! 😊
@AndresFelipeForeroPosted almost 2 years agoHi,
about your question, you can use a dataAttribute, then you can use foreach and finally add the class you need.
example:
HTML
<body data-dark ></body> <main data-dark ></main>
Javscript
$darkElements = document.querySelectorAll([data-dark]) $darkElements.forEach(el => el.classList.toggle("night"))
CSS
.night { styles }
that would be the summary, remember you have to use an event.
Marked as helpful0