css select text color code example
Example 1: custom selection color css
::selection {
color: #000000;
background-color: red;
}
::moz-selection {
color: #000000;
background-color: red;
}
Example 2: change highlight color html
::-moz-selection {
color: red;
background: yellow;
}
::selection {
color: red;
background: yellow;
}
Example 3: css selected color
::selection {
background-color: #222;
color: white;
}
Example 4: how to change selection color of text in css
::-moz-selection {
color: red;
background: yellow;
}
::selection {
color: red;
background:
yellow;
}