This is a basic introduction to the ::selection pseudo-element CSS selector. This document is meant to be a starting point and should be added to/expounded on.
685 B
685 B
title
title |
---|
Selection |
Selection
The ::selection
CSS pseudo-element styles the portion of text a user clicks and drags their cursor over (the highlighted text).
General Syntax:
::selection
Example
/* "Highlighted text will be #F25757 */
::selection {
color: #F25757;
}
The ::selection
CSS pseudo-element is useful for styling user selections to match your website/app theme.