0
::selection
How th browser knows what text to select?
1 Réponse
+ 2
The user select text, and the browser use this pseudo selector to determine what custom style you want to be applyed on the 'selected text' ( obviously by the user )...
::selection { background:red; }
... will make user selected text with a red background ( guessing you've not already choice a such color for that in your os desktop ) for anything in the page: seems to not be possible to target more specifically ^^
To be working on Firefox, need to be vendor prefixed:
::-moz-selection, ::selection { /* ... */ }