::selection pseudo-element
Applies one or more styles to any text on the page that the user has highlighted.
![]() |
Syntax
sel::selection {...}Parameters
- sel
-
A simple selector.
Remarks
The ::selection pseudo-element is the UI element fragments pseudo-element. It is used to select any part of the page that the user has highlighted, including text within an editable text field. This pseudo-element can be applied to the color, background-color, and -ms-high-contrast-adjust properties.
Styling properties on the ::selection pseudo-element do not support the "inherit" value.
Send comments about this topic to Microsoft
Build date: 11/29/2012

