::selection { background: #000000; opacity: 0 }
::-moz-selection { background: #000000; opacity: 0 }
I want the select color on my website to be pure black, but my text is also pure black so when the text is selected it is hidden by the black selection. How can I change the text color to white when it is selected so that non-selected text appears as black text on the white background of the website while selected text appears as white text on a black selection? Thanks
You can set color to white with CSS
colorproperty and removeopacity, because if it’s transparent then you can’t see it.Example