CSS3 Tutorial (9): Set RGB color _css3_css_ Web page Authoring

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:
Div.rgbal1 {Background:rgba (153, 134, 117, 0.2); height:20px;} div.rgbal2 {Background:rgba (153, 134, 117, 0.4); Height: 20px; } DIV.RGBAL3 {Background:rgba (153, 134, 117, 0.6); height:20px;} div.rgbal4 {Background:rgba (153, 134, 117, 0.8); Heigh t:20px; } DIV.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 ...)

The above is CSS3 Tutorial (9): Set the RGB color _css3_css_ page production content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!

  • 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.