Is it possible to have selected text with a solid background rather than a transparent one? Using opacity: 1
does not achieve the desired effect due to some standard override by the browser or other factors.
::-moz-selection {
background: #fff;
color: #000;
}
::selection {
background: #fff;
color: #000;
}
body {
color: #fff;
font-family: sans-serif;
line-height: 2em;
}
div {
padding: 2em;
background: #F8372A;
text-align: center;
}
<div>
<h1>HEY!</h1>
<p>why is my background not<br/><strong>STARK WHITE</strong><br/>when selected?</p>
</div>