4 ms·
Highlights and shadows: the real color of transparent in CSS3 (with examples)
- Foy 14y agoFWIW All the "demo" images look like this: http://imageshack.us/photo/my-images/835/demosk.png/ http://imageshack.us/photo/my-images/835/demosk.png/ Using Opera 12.
- kevingadd 14y agoSame in Firefox. Page must be broken.
- bitsweet 14y agoExamples work on chrome (OSX) => http://cl.ly/image/18290C1W2q2h http://cl.ly/image/18290C1W2q2h
- mark_story 14y agoAll the examples are webkit only. And people wonder why opera and mozilla are a bit frustrated about the state of vendor prefixes and CSS.
- Foy 14y agoAs a rule of thumb I just don't use vendor prefixes... if my stuff breaks I just say I'm ahead of the times. 8)
- notJim 14y agotl;dr for this post: at least in Chrome transparent as a CSS color translates to rgba(0,0,0,0), which means that if you have a gradient from something that isn't fully transparent (alpha channel > 0) to transparent, there will be an awkward phase in the middle where black is visible (because the gradient is transition the alpha channel in lockstep with the color.)