Set background color with rgba() function - HTML CSS CSS

HTML CSS examples for CSS:Color

Description

Set background color with rgba() function

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <style>
.brand, .model {<!--from  w ww.  j  av a 2 s  .c o  m-->
   float: left;
   padding: 5px;
   width: 250px;
   height: 40px;
   text-align: center;
}
.brand {
   background: rgba(88, 0, 0, 0.5);
}
.model {
   background: rgba(0, 88, 0, 0.5);
}

      </style> 
   </head> 
   <body> 
      <div class="brand">
          test 
      </div> 
      <div class="model">
          test 
      </div>  
   </body>
</html>

Related Tutorials