Google News
logo
CSS3 - Interview Questions
What is CSS3 hsla() Function?
The hsla() function define colors using the Hue-Saturation-Lightness-Alpha model (HSLA). HSLA color values are an extension of HSL color values with an alpha channel – which specifies the opacity of the color.
 
Example :
 
#p1 {background-color:hsla(120,100%,50%,0.3);} /* green */
#p2 {background-color:hsla(120,100%,75%,0.3);} /* light green */
#p3 {background-color:hsla(120,100%,25%,0.3);} /* dark green */
#p4 {background-color:hsla(120,60%,70%,0.3);} /* pastel green */
Advertisement