CSS: How to Change Text Selection Color

January 1, 2019

Hi, In This Tutorial We are learning how to Change text Selection Color in CSS. Changing the text Selection Color is always a nice thought, it shows that you’re paying attention to Design.

Today I’m going to share a quick tip that will allow to achieve more different looks for you selected text.

The Selector

The ::selection is the selectore that allow you to apply rules to the selected Text in Document. You have to use this to apply selector color.

For Example If You change the background Color We Just need

If You need to Change the text color. You have to use this

If You need to Add text Shadow You have to Just Need

You can also add the CSS. Like a Font Weight, Font size, Font Family etc. cusing this.

Hope this Helps.

Leave a Reply

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