CSS3 HSLA color property

CSSWeb DevelopmentFront End Technology

HSLA stands for hue, saturation, lightness, and alpha. The alpha value specifies the opacity as shown RGBA.

Example

The following example shows HSLA color property −

Live Demo

<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>
raja
Published on 02-May-2018 10:33:42
Advertisements