Interactive Rating Component with nextjs

Solution retrospective
- Does anybody know how to change the background colour of a selected rating while hovering over other ratings?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Rabberpoli
Hi! Well done doing this challenge! Looking at your code I see you have 5 html elements: one for each rating. If you'd like to change background color on hovering you should do the following:
- Take the CSS class that defines background color of your rating components
- Write this on your css:
.<classname>:hover { background-color: <color>; }
:hover
property gets fired on CSS class when mouse passes over the targeted block.Hope you can find it useful! Keep going and happy coding!
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