Use rgba color function to set background color - HTML CSS CSS

HTML CSS examples for CSS:Color

Description

Use rgba color function to set background color

Demo Code

ResultView the demo in separate window

<html>
   <head>
      <style>
         #p1 {background-color:rgba(255,0,0,0.3);}
         #p2 {background-color:rgba(0,255,0,0.3);}
         #p3 {background-color:rgba(0,0,255,0.3);}
      </style>
   </head><!--   w w  w .  j  a  v  a  2s.  c  o m-->
   <body>
      <p>RGBA colors:</p>
      <p id="p1">Red</p>
      <p id="p2">Green</p>
      <p id="p3">Blue</p>
   </body>
</html>

Related Tutorials