CSS3 setting an instance of an RGB color

Source: Internet
Author: User
Web Authoring WEBJX Article Description: Using the new CSS3 "RGBA" declaration not only allows us to set the RGB color as usual, but also to set its transparency. Using the new CSS3 "RGBA" declaration not only allows us to set the RGB color as usual, but also to set its transparency.
Using the new CSS3 "RGBA" declaration not only allows us to set the RGB color as usual, but also to set its transparency.
Using the new CSS3 "RGBA" declaration not only allows us to set the RGB color as usual, but also to set its transparency.
Previous post: CSS3 Tutorial (8): CSS3 Transparency Guide
RGBA sets the color like RGB, and the last value in this "A"--rgba-allows us to set the transparency of the element. Just like the opacity declaration, an element with a opacity value of 1 is completely opaque, and an element with a opacity of 0 is completely transparent.
Browser Compatibility
RGBA now has better support in Firefox, Google Chrome, and Safari, without the need for a prefix. CSS3 RGBA Color

The above effects are implemented in the following styles:
P.rgbal1 {Background:rgba (153, 134, 117, 0.2); height:20px;} P.rgbal2 {Background:rgba (153, 134, 117, 0.4); height:20px;} P.rgbal3 {Background:rgba (153, 134, 117, 0.6); height:20px;} P.rgbal4 {Background:rgba (153, 134, 117, 0.8); height:20px;} P.RGBAL5 {Background:rgba (153, 134, 117, 1.0); height:20px;}
Browser Support

    • Firefox (3.05 ...)

    • Google Chrome (1.0.154 ...)

    • Google Chrome (2.0.156 ...)

    • Internet Explorer (IE7, IE8 RC1)

    • Opera (9.6 ...)

    • Safari (3.2.1 windows ...)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.