Created
March 15, 2019 05:23
-
-
Save asifvora/5fd9c3249c7845a04c2faabe89258765 to your computer and use it in GitHub Desktop.
Custom text selection changes the styling of text selection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
::selection { | |
background: aquamarine; | |
color: black; | |
} | |
.custom-text-selection::selection { | |
background: deeppink; | |
color: white; | |
} | |
</style> | |
<p class="custom-text-selection">Select some of this text.</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment