Design comparison
SolutionDesign
Solution retrospective
Can anyone pls help how to change the share icon color when clicked? Other feedback also welcome ;)
Community feedback
- @NaleekaPosted about 2 years ago
Hi @Chiku100 👋
You could use,
this will work only while you pressing this div though
// css .share:active{ background-color: lighblue; }
or you could use some JavaScript to change the color
//css .share.clicked { background-color: lightblue; } // js file const shareBtn = document.querySelector(".share"); shareBtn.addEventListener('click', ()=> { shareBtn.classList.add("clicked"); })
Great work.
Hope this was helpful.
Happy Coding 👨🚀🖤
Marked as helpful1
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