I\'m experimenting with the ::selection
pseudo-element in CSS3. In Firefox it works and looks great. My site has a dark navy blue background.
I set the
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;
}