To define a grey semi-transparent background on a given element one
could use the following rule:
.semi-transparent {
background: url('images/semi-transparent.png') grey;
background: rgba(50%,50%,50%,0.5);
}
This is supposed to define a double-fallback:
* browsers that do understand
Jørg,
The parsing logic is sound since browsers that don't understand a given syntax
on a rule will ignore it, and since the rule declares the entirety of the
background property, those that can parse rgba syntax will overwrite the
background image defined previously with the implicit 'none'
Am 12.07.11 19:00, schrieb Barney Carroll:
The parsing logic is sound since browsers that don't understand a
given syntax on a rule will ignore it, and since the rule declares
the entirety of the background property, those that can parse rgba
syntax will overwrite the background image defined
On Jul 13, 2011, at 1:47 AM, Joergen W. Lang wrote:
.semi-transparent {
background: url('images/semi-transparent.png') grey;
background: rgba(50%,50%,50%,0.5);
}
This is supposed to define a double-fallback:
* browsers that do understand rgba() use the second declaration
* browsers