Rock1 CSS Gradient

In this example below you will see how to do a Rock1 CSS Gradient with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by ArcticSquire, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright ArcticSquire ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Rock1 CSS Gradient</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

   <div class="gradient"> <img src="https://img.bauerweb.co.uk/img/g56d717e430304_2016_03_02_Munch_Coffee_Shop_Tour/img_607756d717f96a2fc_1456936952.jpg_1024x768.jpg" width="" height=""></div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/ArcticSquire/rock1-css-gradient-GZJLvo */
.gradient {
  position:relative;
  display:inline-block;
}
.gradient img {
  display: block;
}
.gradient:after {  
    opacity:0.7;
    content: '';
		position: absolute;
		top: 0;
		bottom: 0;
    width:100%;
    height:100%;
    display:inline-block;
 background: rgba(238,114,2,1);
background: -moz-linear-gradient(-20deg, rgba(238,114,2,1) 0%, rgba(238,114,2,1) 33%, rgba(229,8,126,1) 91%, rgba(229,8,126,1) 100%);
background: -webkit-gradient(left top, right bottom, color-stop(0%, rgba(238,114,2,1)), color-stop(33%, rgba(238,114,2,1)), color-stop(91%, rgba(229,8,126,1)), color-stop(100%, rgba(229,8,126,1)));
background: -webkit-linear-gradient(-20deg, rgba(238,114,2,1) 0%, rgba(238,114,2,1) 33%, rgba(229,8,126,1) 91%, rgba(229,8,126,1) 100%);
background: -o-linear-gradient(-20deg, rgba(238,114,2,1) 0%, rgba(238,114,2,1) 33%, rgba(229,8,126,1) 91%, rgba(229,8,126,1) 100%);
background: -ms-linear-gradient(-20deg, rgba(238,114,2,1) 0%, rgba(238,114,2,1) 33%, rgba(229,8,126,1) 91%, rgba(229,8,126,1) 100%);
background: linear-gradient(135deg, rgba(238,114,2,1) 0%, rgba(238,114,2,1) 33%, rgba(229,8,126,1) 91%, rgba(229,8,126,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ee7202', endColorstr='#e6007e', GradientType=1 );
}

Comments