CSS selection color behaving strangely on Chrome
Possibly to prevent exactly what you are trying to do, it seems like Chrome will change the opacity of the background color of the selection if it's 1. You can cheat this by setting the opacity very close to 1 like (background-color: rgba(0,0,0,.99)
.
http://jsfiddle.net/ExplosionPIlls/a3gfR/5/
CSS3 ::selection behaves differently in FF & Chrome
For some reason Chrome forces it to be semi-transparent. However, you can get around this by setting the background
using rgba. I have set the alpha value to be just 0.01 less than 1. Live example: http://jsfiddle.net/tw16/m8End/
p::-moz-selection {
background:rgba(255, 255, 125, 0.99);
color:#032764;
}
p::-webkit-selection {
background:rgba(255, 255, 125, 0.99);
color:#032764;
}
p::selection {
background:rgba(255, 255, 125, 0.99);
color:#032764;
}
Issue with background color and Google Chrome
Never heard of it. Try:
html, body {
width: 100%;
height: 100%;
background-color: #000;
color: #fff;
font-family: ...;
}
Related Topics
Create Angular Material Theme with CSS Variables
How to Style a Gtklabel with CSS
Can Grid-Row-Gap/Grip-Column-Gap Be Overridden for a Single Gutter
Is Decimal Precision When Specifying a Font-Size Respected by All Browsers
CSS Selector: First Paragraph's First Letter Inside a Div
Css: Semi-Transparent Background and an Image
How to Include SCSS File in HTML
Is Position: Fixed Z-Index Relative to Its Parent's Z-Index
How to Get Rid of Input Border in Chrome
Safari Rounding Down on Subpixel Calculations
How to Use Webfont with @Font-Face
Can the :Before and :After Pseudo-Elements Inherit Height from the Parent Element
Is Anyone Experiencing Layout Issues After Upgrading to Chrome 72
How to Update and Include Twitter Bootstrap 3 on Webapp or Yo Angular
Export HTML Table to Excel and Keep CSS Styles
Package for Showing All Possible CSS Values in Sublime Text 2