You are reading

How to Change Text Selection Color Using CSS3

Text Color in CSS3

This is quick and easy way to do a little branding to your or your client’s website. If you want to see this CSS3 effect in action you have to use Opera 9.5+, Chrome 2+ or Safari 3.1+ browser and just select text in mazeofminds.com. To make it work on other browsers we have to use vendor prefixes.

The code example to achieve this effect :

::selection {

background: #111113;
color:#fff;
}

::-moz-selection {

background: #111113;
color:#fff;
}

::-webkit-selection {

background: #111113;
color:#fff;

}

Leave a Reply

Your name is required
Your email is required
Optional
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>