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;
}Code language: CSS (css)

Leave a Reply

Your email address will not be published. Required fields are marked *