How to change background color of selected text

I was willing to see how some of websites have beautiful colors when we select text on the pages. Just searching for the trick and got that its a simple CSS property to override default behaviour of browsers. You have to just apply background color and its done, more over if you want to change the text color also you can apply color in CSS. This simple CSS class will do it all for you.


Fiddle : (select the text below),js,html,css/

Say something : I accept all the "Humer&Critic"

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s