Css Selected Text Color Code Example


Example 1: custom selection color css


::selection {
color: #000000;
background-color: red;
}

/* for firefox */
::moz-selection {
color: #000000;
background-color: red;
}

Example 2: change highlight color html


::-moz-selection { /* Code for Firefox */
color: red;
background: yellow;
}

::selection {
color: red;
background: yellow;
}

Example 3: css selected color


::selection {
background-color: #222;
color: white;
}

Example 4: css selector color


::selection {
color: #ffffff;
background-color: red;
}

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable