Create background image out of linear-gradient - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image

Description

Create background image out of linear-gradient

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css"> 
  <style id="compiled-css" type="text/css">
body {<!--from   w w  w  .  j a  v  a2s .co m-->
   background:Chartreuse;
}

.fa-flickr:before {
   color:yellow;
   background-size:100% 51%;
   background-repeat:no-repeat;
   background-position:0% 51%;
   background-image:linear-gradient(
   to right,
   blue 51%,
   pink 51%
   );
}
</style> 
 </head> 
 <body> 
  <i class="fa fa-flickr fa-3x"></i>  
 </body>
</html>

Related Tutorials