Skip to content

Instantly share code, notes, and snippets.

@sudarshanReddykurri
Created March 12, 2016 15:45
Show Gist options
  • Save sudarshanReddykurri/713f1bb40dcec6b4631b to your computer and use it in GitHub Desktop.
Save sudarshanReddykurri/713f1bb40dcec6b4631b to your computer and use it in GitHub Desktop.
Gradients Demo
/* Gradients Demo */
.g1{
background: linear-gradient(#fb3 50%, #58a 50%);
background-size: 100% 30px;
background-repeat: no-repeat;
width: 200px;
height:200px;
margin: 20px;
}
.g2{
background: linear-gradient(#fb3 30%, #58a 30%);
background-size: 100% 30px;
width: 200px;
height:200px;
margin: 20px;
}
.g3{
background: linear-gradient(#fb3 30% , #58a 0 );
width: 200px;
height:200px;
margin: 20px;
}
.dg1{
background: linear-gradient(45deg,#fb3 50%, #58a 0);
background-size: 300px 300px;
background-repeat: no-repeat;
width: 200px;
height:200px;
margin: 20px;
}
.dg2{
background: linear-gradient(45deg,
#fb3 25%, #58a 0, #58a 50%,
#fb3 0, #fb3 75%, #58a 0);
background-size: 300px 300px;
background-repeat: no-repeat;
width: 200px;
height:200px;
margin: 20px;
}
.dg3{
background: #58a;
background-image: repeating-linear-gradient(30deg,
hsla(0,0%,100%,.1),
hsla(0,0%,100%,.1) 15px,
transparent 0, transparent 30px);
width: 200px;
height:200px;
margin: 20px;
}
<!-- Demo On CSS Gradients
-->
<div class="g1"></div>
<div class="g2"></div>
<div class=" g3"></div>
<div class="dg1"></div>
<div class="dg2"></div>
<div class="dg3"></div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment