Design comparison
Solution retrospective
Does somebody know how to write JS when I have mouse over each diagram, diagram is active and when I get mouse out of diagram, diagram goes inactive?
Community feedback
- @CreatorLZPosted over 2 years ago
It's simplest if you were using react. You just need to set the hover effect and style it however you wish. I just completed this challenge. You can check out the code. For the black boxes on each bar, I set the initial opacity to 0 then targeted the components containing the boxes with an hover effect and set the opacity back to 1. This is possible as I used styled components. I must sound strange. Checkout my code. It's all there
Marked as helpful0 - @Md-Raihan-AlamPosted over 2 years ago
Hello Piotr, Congratulation on completing this project. I am going to answer some of your questions first. First, for the mouse hover in the js case, you can use 'mouseenter', 'mouseleave', 'mouseover' events. You can read this document for more details about the many mouse events and how to use them ->https://www.w3schools.com/jsref/obj_mouseevent.asp. Second, your site needs to be developed in the responsive case as I see It is not much of responsive yet but still ok for how far you have come. Try to make sure your site is responsive at least 320px as this is the lowest width of mobile now in current days so try to work with percentages instead of rem. You can still use rem but you need a better understanding, for me, the width is much easier than rem, and finally, try to read some blogs about media queries. They might help you to clear your concept more. you can find a responsive site video on freecodecamp youtube channel.
Don't forget to give a like and mark this helpful if my comment is helpful to you!!
0
Please log in to post a comment
Log in with GitHubJoin 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