472 B
472 B
title, type, tags, cover, dateModified
| title | type | tags | cover | dateModified | |
|---|---|---|---|---|---|
| Custom text selection | snippet |
|
digital-nomad | 2020-12-30T15:37:37+02:00 |
Changes the styling of text selection.
- Use the
::selectionpseudo-selector to style text within it when selected.
<p class="custom-text-selection">Select some of this text.</p>
::selection {
background: aquamarine;
color: black;
}
.custom-text-selection::selection {
background: deeppink;
color: white;
}