CSS ::selection Selector
Make the selected text red on a yellow background:
Definition and Usage
::selection selector matches the portion of an element that is selected by a user.
Only a few CSS properties can be applied to the ::selection selector: color, background, cursor, and outline.
The numbers in the table specify the first browser version that fully supports the property.
Numbers followed by -webkit- or -moz- specify the first version that worked with a prefix.