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?