Custom Selection Color css3

by muthu 2014-02-21 12:30:56

Selection Color css3
---------------------------------------------DEMO----------------------------------------------------
selection_color.jpg
---------------------------------------------CSS3----------------------------------------------------
.red::selection { background-color: red; }
.red::-moz-selection { background-color: red; }
.green::selection { color:white; background-color: green; }
.green::-moz-selection { color:white; background-color: green; }
.blue::selection { color:white; background-color: blue; }
.blue::-moz-selection { color:white; background-color: blue; }

---------------------------------------------HTML5----------------------------------------------------
<h3>Custom Selection Color Using CSS3</h3>
Select me, I'm the default color.
<p class='red'>Select me, I'm a custom selection color.</p>
<p class='green'>Select me, I'm another custom color.</p>
<p class='blue'>Select me, I'm another custom color.</p>

-------------------------------------------------------------------------------------------------
668
like
0
dislike
0
mail
flag

You must LOGIN to add comments