Change the selection color of the entire page

I am currently using

::selection {
background: rgba(3, 35, 75, .7);
}

But it only changes color / opacity when I selected text or something like that. When I press CTRL + A, it goes to the default color / opacity in empty places, etc.

How to change this?

Example: Example image Please note that the gray selection is blue, it just acts as I laid out.

+4
source share
2 answers

I don't know if this is a good practice, but it will work with a selector *.

*::selection {
background: rgba(3, 35, 75, .7);
}
0
source

try replacing all numbers, the last one is important, which needs to be replaced.

-3
source

Source: https://habr.com/ru/post/1615954/


All Articles