CSS3--Transparent Color (RGBA)

Source: Internet
Author: User
Tags border color transparent color

1. Rgba Description

RGB: Red R, Green G, blue B

RGBA: Red R, Green G, blue B, transparency Alpha

  Value:

R, G, b     Value: Positive integer (0 ~ 255) | percent (0% ~ 100%), (the value out of range will be up to its nearest value limit.) Not all browsers support the use of percent values. )

A transparency value: the value of 0~1 between; (not negative)

2. RGBA compatible

3. RGBA usage

  RGBA: Make transparent color (transparent background color, transparent border color, transparent foreground color, etc.),

Opacity: It is common to make background color in CSS2 , but it is problematic to use it to make a border or foreground color.

  Compatible notation in CSS2:

/* ie5-7 */filter:alpha (opacity=80); /* IE 8 */-ms-filter: "Progid:DXImageTransform.Microsoft.Alpha (opacity=80)"; /* Everyone else */opacity:0.8;

 CSS3 in the compatible wording:

Background:rgb (0,0,0); /*the Fallback color, you can also use a picture instead of */background:rgba (0, 0, 0,0.5);-ms-filter: "Progid:d XImageTransform.Microsoft.gradient (gradienttype=1,startcolorstr= #80000000, endcolorstr= #80000000) "; /*filter for IE8 *    /filter:progid:DXImageTransform.Microsoft.gradient (gradienttype=1,startcolorstr= #80000000, Endcolorstr= #80000000); /*filter for older IEs */

CSS3--Transparent Color (RGBA)

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.