CSS3 Opacity property

CSSWeb DevelopmentFront End Technology

The opacity is a thinner paints need black added to increase opacity.

The following example shows CSS3 Opacity property −

Example

Live Demo

<html>
   <head>
      <style>
         #m1 {background-color:rgb(255,0,0);opacity:0.6;}
         #m2 {background-color:rgb(0,255,0);opacity:0.6;}
         #m3 {background-color:rgb(0,0,255);opacity:0.6;}
      </style>
   </head>
   
   <body>
      <p>HSLA colors:</p>
      <p id = "m1">Red</p>
      <p id = "m2">Green</p>
      <p id = "m3">Blue</p>
   </body>
</html>
raja
Published on 02-May-2018 14:06:38
Advertisements