Why the following fallback for IE color: red;
does not work ?
In IE7, the color is black
rather than red
.
Live demo here
HTML:
<div>
<span>Hello</span>
</div>
CSS:
div {
width: 200px;
height: 100px;
background-color: blue;
text-align: center;
}
span {
font-size: 2em;
color: red;
color: rgba(250, 250, 97, 0.9);
}
3rd party edit
The mozilla mdn on css color lists the different options for color: value
- CSS 2 specification:
color: <value>
and value can be a keywordred
orrgb(255,0,0)
- CSS Color Module Level 3 (Recommendation 2017-12) added SVG colors, the rgba(), hsl(), and hsla() functions for example:
rgba(0,0,0,0)