Selection background-color does not work [closed]

0

I have the following CSS:

*::selection {background-color:red;color:blue;}
*::-moz-selection {background-color:red;color:blue;}
*::-webkit-selection {background-color:red;color:blue;}

Where, any part of the text, it leaves the background in red and the text in blue.

Only background-color is not working.

    
asked by anonymous 08.01.2015 / 18:42

1 answer

1

Maybe some other rule is overlapping this because CSS is correct and working .

TrydeclaringthisruleattheverybeginningoftheCSSfile,aboveanyotherdefinition.

::selection {background-color:red;color:blue;}
::-moz-selection {background-color:red;color:blue;}
::-webkit-selection {background-color:red;color:blue;}

/* outras regras... */
<p>Quisque sollicitudin elit sed orci gravida, nec accumsan enim pulvinar.
Curabitur eu turpis non nulla sodales consequat in in turpis. Ut iaculis, elit
dapibus interdum vulputate, mi nibh finibus neque, scelerisque commodo massa
odio ut diam. Cras nec massa eget tellus mattis consequat. Nulla ut dictum enim.
Proin molestie gravida sapien, at tincidunt erat ultrices vel. Integer in quam
in arcu rutrum malesuada at.</p>
    
08.01.2015 / 18:57