In the web design, sometimes you need to implement the CSS background transparent text opaque effect. So how do you make the background transparent through CSS? This article will show you how to use CSS to set the background transparent and text opaque method. Hope to be helpful to the needy friend.
CSS background transparent text opaque specific code examples are as follows:
<! DOCTYPE html>
Effects such as:
From the obvious, CSS realizes the div background transparent, and the text opaque effect. The point of knowledge we need to master here is the Rgba () function in Background-color. Use Rgba (0,0,0,0.5) in CSS to represent Rgha. The last parameter represents the alpha channel, which represents transparency.
And by the way, there are three ways to define colors in CSS: Using color methods (RGB, RGBA, HSL, HSLA), hexadecimal color values, and predefined color names. RGBA is an abbreviation that represents red (red) green (green) blue (blue) and Alpha (opacity) three words.
Value:
R |
The red value. Positive integers | Percentage |
G |
The green value. Positive integers | Percentage |
B |
The blue value. Positive integers | Percentage |
A |
Alpha transparency. Value between 0~1. |
Then through the above about using CSS to set the background transparent, text opaque effect content introduced, I hope to have the need for friends to help.