Skip navigation.

Slightly ajar

Writing for CSS3.info

,

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.

iPhone and developing for mobileA look at the CSS3 Colour module

Comments

yehezkelshb 9. July 2007, 15:04

May you have a mistake in the code? you wrote twice "rgba", it's not supposed to be just "rgb" in the first place?

Guille 9. July 2007, 16:11

I see that the url on "first post" is empty

fearphage 9. July 2007, 16:18

Congrats! Here's what the link should be: http://www.css3.info/styling-figures-with-css3/

dstorey 9. July 2007, 18:04

Yehezkelshb: You're right. I made a copy/paste mistake.

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

Congratulations!

RGBA can surely make his way, particularly by replacing the 1px semi-transparent PNG used as background...

Darken 16. July 2007, 22:10

Hummm,

Opacity and RGBA will be implanted/supported in Opera 9.5?

Example:
background-color: rgba(255, 0, 0, 0.6);

dstorey 17. July 2007, 13:26

Opacity is already supported in Opera 9. RGBA (and HSLA) are not currently supported, but we are looking into what features web developers want, and what features can be implemented in the time-scale we have before beta testing and release.

Darken 17. July 2007, 18:24

Okay, I note this info for RGBA and HSLA. I bet this feature will be included into Peregrine builds (Opera 10).

supercoloring 9. November 2009, 15:36

Congratulations!

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies