Writing for CSS3.info
Monday, 9. July 2007, 13:10:17
As announced previously on this blog, i've been asked to write for CSS3.info. My first post has just been published yesterday. This is the first in a series of articles on how to use CSS3 properties that have an existing implementation, focusing on real world style examples. effort has been made to write the examples in a way that degrades gracefully in browsers that do not support the required CSS3 property. In this article, I demonstrated the use of the new RGBA color value. This adds a alpha channel to the existing RGB value. This is currently supported in both Safari and Firefox. The advantage over opacity is that opacity is applied to the entire element (such as the text and background) while RGBA can be applied to just the background or text colour. As browsers are instructed to ignore RGBA values if they do not understand the alpha channel, as opposed to just applying the red, green and blue channels ignoring the alpha channel, it is important to apply a regular colour value before specifying the RGBA value, such as background-color: rgb(255, 0, 0); background-color: rgba(255, 0, 0, 0.6);. Browsers that support RGBA will override the regular colour.



yehezkelshb # 9. July 2007, 15:04
Guille # 9. July 2007, 16:11
fearphage # 9. July 2007, 16:18
dstorey # 9. July 2007, 18:04
Guille: Seems I typed a single quote accidentally instead of a double quote.
Two mistakes in such a short post...woops.
Romain Vigier # 14. July 2007, 11:33
RGBA can surely make his way, particularly by replacing the 1px semi-transparent PNG used as background...
Darken # 16. July 2007, 22:10
Opacity and RGBA will be implanted/supported in Opera 9.5?
Example:
dstorey # 17. July 2007, 13:26
Darken # 17. July 2007, 18:24
supercoloring # 9. November 2009, 15:36