Set background color from position - HTML CSS CSS Property

HTML CSS examples for CSS Property:background-color

Description

Set background color from position

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">

p.tax-free-keksis {
   background-image:
   linear-gradient(to right, transparent 50px, #c2e8fb 50px),
   url(https://www.java2s.com/style/demo/Firefox.png);
   background-position: left center;
   background-repeat: no-repeat;
   background-color: transparent;
   padding-top: 15px;
   padding-left: 50px;
   padding-right: 10px;
   text-align: left;
}


      </style> 
 </head> <!--from   w w  w.  j  a  v a  2  s. co  m-->
 <body> 
  <p class="tax-free-keksis">text here text here text here text here text here text here text here text here text here text here text here text heretext here text here </p>  
 </body>
</html>

Related Tutorials