W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <head> <style> #p1 {background-color:hsla(120,100%,50%,0.3);} #p2 {background-color:hsla(120,100%,75%,0.3);} #p3 {background-color:hsla(120,100%,25%,0.3);} #p4 {background-color:hsla(120,60%,70%,0.3);} #p5 {background-color:hsla(290,100%,50%,0.3);} #p6 {background-color:hsla(290,60%,70%,0.3);} </style> </head> <body> <p>带不透明度的 HSL 颜色:</p> <p id="p1">绿色</p> <p id="p2">浅绿色</p> <p id="p3">深绿色</p> <p id="p4">淡绿色</p> <p id="p5">紫色</p> <p id="p6">淡紫色</p> </body> </html>