CSS: selection {background: # 000000; color: #ffffff} does not appear as full black

::selection { background: #000000; color: #ffffff } 

The result is a dark gray highlight, not a full black ( #000000). Changing transparency does not matter.

How to make the highlight color displayed as #ffffff?

+5
source share
2 answers

This worked for me:

::selection {
   background: rgba(0, 0, 0, 0.99);
   color: #FFF;
}
+18
source

I had the same problem, I had to change the code to the background color, because this solution did not work for me.

::selection {
    background-color: #000000;
    color: #FFF;
}
0
source

All Articles