How to change the default text selection color in the browsers using CSS?

Posted by Pinki | Updated on

n this example you will learn, how to change the default text selection color in the browsers using CSS. Currently browsers only support a small subset of CSS properties for ::selection pseudo-element like color, background-color and text-shadow. Let’s check out an example:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers