Fill background color only 50% within it total width - HTML CSS CSS Property

HTML CSS examples for CSS Property:background-color

Description

Fill background color only 50% within it total width

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

.progress {<!--  w  w  w.j a v  a 2 s.c  o m-->
   width:200px;
   height:50px;
   border:1px solid black;
   background: -webkit-linear-gradient(left, black 50%, white 50%);
   background: -moz-linear-gradient(left, black 50%, white 50%);
   background: -ms-linear-gradient(left, black 50%, white 50%);
   background: linear-gradient(left, black 50%, white 50%);
}


      </style> 
 </head> 
 <body> 
  <div class="progress"> 
  </div>  
 </body>
</html>

Related Tutorials