Changing the mouse selection styles
by Tobias | 23. August 2021 |
You can make the color of a text passage change when it is selected on your page with the mouse. Just set the color values as you like.
/* Change the mouse selection styles */
::-moz-selection {
background: #000;
color:#fff;
}
::selection {
background: #000;
color:#fff;
}
Discover more useful code snippets:
Tobias is a WordPress and Divi expert and the founder of Divitorials.com. As a passionate web designer, he helps small and medium-sized businesses as well as self-employed people and freelancers to be more successful online. In his free time he loves to play the guitar, to travel or to cook delicious dishes.