HSLA代表色相,饱和度,亮度和Alpha。alpha值指定不透明度,如RGBA所示。
以下示例显示了HSLA颜色属性-
<html> <head> <style> #d1 {background-color:hsla(120,100%,50%,0.3);} #d2 {background-color:hsla(120,100%,75%,0.3);} #d3 {background-color:hsla(120,100%,25%,0.3);} </style> </head> <body> <p>HSLA colors:</p> <p id = "d1">Less opacity green</p> <p id = "d2">Green</p> <p id = "d3">Green</p> </body> </html>