How to Set Text Selection Color with CSS

With this useful piece of CSS you can change color and background of the selected text.

Yes! Give it a try and select some text 😉

::selection { background-color: green; color: #FFF; text-shadow:none; }

About Ricard Torres

Senior Front-end Software Engineer from Barcelona, Haidong Gumdo Instructor (korean martial art of the sword), street photographer, travel lover, TV addict, Boston Red Sox fan, and privacy advocate.

@ricard_dev @ricard_dev

📝 Blog 🎙 Podcast

Leave a Reply

Add <code> Some Code </code> by using this tags.