How does css change the transparency of words?
This article mainly introduces css how to change the transparency of the word, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Css lets the word change the transparency method: 1, uses the opacity attribute, adds "opacity: transparency value;" the style to the text element; 2, uses the rgba () function, adds "color:rgba (red, green, blue, transparency value);" style to the text element.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
Css changes the transparency of words
Method 1. Use the opacity attribute
Test text
The Opacity attribute sets the transparency level of an element.
Syntax:
Opacity: value
Value: specifies the opacity. From 0.0 (fully transparent) to 1.0 (completely opaque).
Method 2: use the rgba () function
Test text
Effect picture:
The rgba () function uses the superposition of red (R), green (G), blue (B), and transparency (A) to generate a variety of colors.
Syntax:
Rgba (red, green, blue, alpha)
Attribute value:
Value description red defines red values, which range from 0 to 255. you can also use percentages from 0 to 100%. Green defines green values, ranging from 0 to 255, or percentages from 0 to 100%. Blue defines blue values, ranging from 0 to 255, or percentages from 0 to 100%. Alpha-Transparency definition Transparency 0 (completely transparent) ~ 1 (completely opaque) Thank you for reading this article carefully. I hope the article "css how to change Transparency" shared by the editor is helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!