Home arrow Style Sheets arrow The RGBA CSS3 Property: an Overview
STYLE SHEETS

The RGBA CSS3 Property: an Overview


Website developers use many effects to produce beautiful web pages. Some effects, however, are more difficult to achieve than others. Surprisingly, the transparency or opacity of web page elements falls into this category -- especially if you want the effect to look right on all browsers. Fortunately, the upcoming CSS3 specification brings a solution to this problem, called the rgba property. This four-part series takes a closer look at what you'll be able to do with this property once the specification is approved.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
May 05, 2010
TABLE OF CONTENTS:
  1. · The RGBA CSS3 Property: an Overview
  2. · Handling the opacity of an HTML element in a quick and dirty way with the opacity CSS property
  3. · Manipulating the opacity of the text of an HTML element via the rgba CSS3 property
  4. · Altering the opacity of the background of an HTML element

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
The RGBA CSS3 Property: an Overview
(Page 1 of 4 )

Among the vast arsenal of techniques that many web designers implement for building eye-catching user interfaces, the clever manipulation of the alpha-based opacity of certain elements on a web page is a very popular approach. In most cases it yields impressive results. Unfortunately, the process is extremely tricky, and requires often the use of a JavaScript abstraction layer that internally solves the incompatibilities between most major browsers. That’s sad but true.

Of course, it’s fair to stress that the improved support offered by Internet Explorer 7 and up for transparent PNG graphics now allows developers to easily create all sorts of consistent images that blend gracefully with the background of an (X)HTML document. Naturally, in a case like this, defining the level of opacity for specific sections of an image is a task accomplished via a graphic editor and not by a browser’s rendering engine.

Quite possibly, at this time you may be wondering if CSS makes it possible to handle the opacity of an HTML element at will without having to rely on heavy graphics. Well, the “opacity” property was conceived for doing exactly that, but not surprisingly, Internet Explorer doesn’t recognize it at all. Too bad.

However, not all is lost when it comes to programmatically manipulating the alpha opacity of web page elements. The upcoming CSS3 specification includes a powerful property called “rgba” which can be used for specifying the color of a target element in conjunction with its level of opacity (hence the “a=alpha” letter in its name).

This remarkable ability will allow developers to create (in the near future) engaging, highly selective transparency effects on different HTML elements that can be achieved today only by using graphics. Thus, in this group of tutorials I’m going to take a closer look at the aforementioned “rgba” CSS3 property, so you can learn how to put it to work for you.

Did my proposal catch your attention? Then start reading right now!      


blog comments powered by Disqus
STYLE SHEETS ARTICLES

- CSS Combinators: Working with Child Combinat...
- CSS Combinators: Using General Siblings
- Intro to CSS Combinators
- CSS Semicircles and Web Page Headers
- Drawing Circular Shapes with CSS3 and Border...
- More CSS Pagination Link Templates
- CSS Pagination Links
- Animated CSS3 Image Gallery: Advanced Transi...
- CSS3 Animated Image Gallery: Transitions
- CSS3 Properties: Fixed Heights with box-sizi...
- CSS3 Properties: Altering Strokes and 3D Eff...
- CSS3 Properties: Text-Stroke
- CSS3 Transitions: Width and Height Properties
- Creating a Drop Down Menu in CSS3
- Intro to CSS Transitions

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 11 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials