Design comparison
Solution retrospective
- How to create display click event on arrow(share) button?
- How to change svg fill using click event?
Community feedback
- @mcktivityPosted about 4 years ago
You are doing well! keep it up!
-
using plain javascript, you can use
document.getElementById("myDIV").className += " mystyle";
to add a new class on your element. In mystyle class you can then have for example:height: xx
, override adisplay:none
todisplay:xx
orvisibility:hidden
tovisibility: visible
. or you can directly change style like this:document.getElementById("myDIV").style.display = "none"
-
you can use filter attribute then try
brightness(0) invert(1)
to achieve white color. another option would be another svg with different fill color. or there's a longer method in stackoverflow for changing fill on svg in an img tag.
Hope this helps! you can check my solution if you have time.
2@ceize123Posted about 4 years ago@mcktivity Thanks for your solution! I'll definitely try it once I got time!
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