Home arrow Style Sheets arrow Altering the Border Opacity of an HTML Element with the RGBA CSS3 Property
STYLE SHEETS

Altering the Border Opacity of an HTML Element with the RGBA CSS3 Property


In this second part of the series, you will learn how to take advantage of the functionality provided by the rgba CSS3 property to change the opacity of the borders of all of the H2 headers included in a sample web page. This straightforward process simply involves assigning a color and a level of transparency to the pertinent borders. Period.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
May 06, 2010
TABLE OF CONTENTS:
  1. · Altering the Border Opacity of an HTML Element with the RGBA CSS3 Property
  2. · Review: changing the opacity of individual sections of an HTML element with the rgba CSS3 property
  3. · Changing the opacity of the borders of an HTML element
  4. · Including the previous CSS styles in a web page

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Altering the Border Opacity of an HTML Element with the RGBA CSS3 Property
(Page 1 of 4 )

It’s not breaking news that the upcoming CSS3 specification includes a great variety of handy and exciting features that will shed a refreshing light on the way that websites can be developed nowadays. Among the numerous properties bundled with CSS3, however, is one that you may find particularly interesting, because of its easy implementation and flat learning curve.

In this case, of course, I’m talking about the “rgba” property, a powerful version of its old predecessor “opacity” that will permit you to simultaneously assign a specific color and a level of opacity to different sections of an HTML element, including its inner text, background and borders. That sounds pretty good, right?

Of course, if you had the chance to take a peek at the first part of this series, then you already have a clearer idea of how to work with the “rgba” property. In that tutorial I demonstrated how to individually change the opacity of the text and the background of all of the H2 elements included in a sample web page. Creating this kind of visual effect in an (X)HTML document could formerly be achieved only by using JavaScript or transparent PNG graphics, which speaks for itself as to how powerful the property really is.

As I noted just a moment ago, though, the rgba property can also be used for manipulating the opacity of the borders assigned to an HTML element. This process is very similar to handling the transparency of its wrapped text and background. If you’re interested in learning how to accomplish this in a few simple steps, in this second chapter of the series I’m going to demonstrate how to implement this effect on the web page coded in the preceding article.

Now it’s time to explore this interesting capability offered by the “rgba” CSS3 property. Let’s go!   


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 7 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials