492 B
492 B
title, tags, cover, firstSeen, lastUpdated
| title | tags | cover | firstSeen | lastUpdated |
|---|---|---|---|---|
| Custom text selection | visual | digital-nomad | 2018-02-25T15:14:39+02:00 | 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;
}