CSS3 RGBA color

Detailed explanation of RGBA color value of CSS3:
This chapter will introduce the usage of RGBA color value. You must feel very familiar with it. This is because everyone is very familiar with RGB, but An additional A is added at the end.
Grammar structure:

RGBA(R,G,B,A)

Parameter analysis:
R(red ): red value. Positive integer | Percent.
G(green): Green value. Positive integer | Percent.
B(blue): Blue value. Positive integer | Percent.
A(Alpha): Alpha transparency, value between 0 and 1.
RGBA is based on RGB and adds a parameter to control alpha transparency. The positive integer values ​​​​of the three parameters R, G, and B are 0-255, and the percentage value is 0.0% - 100.0%. Values ​​outside the range will be Up to its nearest value limit, the value of parameter A is between 0 and 1. It is important to note that not all browsers support percentage parameter values.
Browser compatibility:
The RGBA color value compatibility is pretty good. It is not supported by IE8 and browsers below IE8, but is supported by other standard browsers.
Code example:

<!DOCTYPE html>
<html>
<head>
<meta charset=" utf-8">
<meta name="author" content="http://ask.php.cn/" />
<title>CSS3教程</title> 
<style type="text/css"> 
.first{color:rgba(128,128,128,0.2);} 
.second{color:rgba(50%,50%,50%,0.3);} 
.third{color:rgba(160,100,150,0.6);} 
</style> 
</head> 
<body> 
<div class="first">php中文网欢迎您</div> 
<div class="second">php中文网欢迎您</div> 
<div class="third">php中文网欢迎您</div> 
</body> 
</html>
Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset=" utf-8"> <meta name="author" content="http://ask.php.cn/" /> <title>CSS3教程</title> <style type="text/css"> .first{color:rgba(128,128,128,0.2);} .second{color:rgba(50%,50%,50%,0.3);} .third{color:rgba(160,100,150,0.6);} </style> </head> <body> <div class="first">php中文网欢迎您</div> <div class="second">php中文网欢迎您</div> <div class="third">php中文网欢迎您</div> </body> </html>
submitReset Code