CSS3 Rgba equals RGB plus opacity?

Source: Internet
Author: User

In our front-end design, there are two tutorials: CSS3 RGBA Colors Usage Instructions CSS3 opacity attribute learning and practice, they don't introduce the use of rgba,rgb,opacity, here we put these three attributes together to consider: CSS3 is Rgba equal to RGB plus opacity?

Please don't answer first, we will analyze and analyze next.

Before we often encounter such a problem, set a div opacity (transparency), the content of this div layer is also transparent, especially the text, a transparent is far away from the effect we want to show that this is not what we need. I used to encounter the wind this situation is usually a transparent div with the contents of the original in the middle of a two-lateral element, and then by positioning to make the content of the element cover transparent div above, the general problem can be solved, but it is not a problem, think, if we have more than the content of the words, how to do? JS Bar, oh, it is so no benefit of the matter.

Let's take a look at the things that have happened in CSS3.

Rgba,rgb,opacity these three properties have been mentioned before, here I repeat, Rgba is to define a color of the red and green blue value and the transparency of this color. RGB only defines the color's red-green-blue value, opacity is the transparency of the defined element. Did you find the point?

Opacity is to define the transparency of an element , and for a Web page, the element and a specific "thing", such as a layout element, a diagram element, a page RGBA and RGB are defined as attributes of this element

My understanding is that the two words defining elements and defining element properties are different from the hierarchy of the elements themselves.

My understanding may be wrong, but look at the following example, you will understand

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> 

Article from: http://www.webskys.com/css3/74.html

CSS3 Rgba equals RGB plus opacity?

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.