Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Intro section dropdown navigation using Tailwind CSS

@antonio-lopez

Desktop design screenshot for the Intro section with dropdown navigation coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Learned about the mouseover and mouseenter event for mouse hover. Ended up using mouseenter and mouseleave to show and hide the desktop menu when the mouse hovers over the navbar options. What is another way to achieve the hover affect?

Community feedback

@ramawib

Posted

I used mouseover and mouseout for my code to change the arrow image src on hover. It looks something like this:

featuresMenu.addEventListener("mouseout", function () { dropDown1.style.display = "none"; arrow[0].src = "images/icon-arrow-down.svg"; });

For showing and hiding dropdown menu, I used CSS :hover instead. Hope that helps!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord