1/* A gradient tilted 100 degrees,
2 starting gray and finishing black */
3
4.class {
5 background: linear-gradient(100deg, rgba(63, 63, 63, 0.8) 0%, rgba(255, 255, 255, 0) 25%);
6}
7
8/* A gradient going from the bottom to top
9 starting red and finishing orange */
10
11.class {
12 background: linear-gradient(to top, #f32b60, #ff8f1f);
13}
14
1.yourElementClass{
2 background: linear-gradient(to top, #fff000 0%, #000fff 100%);
3 /* 1st property: from where the 100% starts */
4 /* 2nd property: the first color */
5 /* 3rd property: the second color */
6 /* to add some colors to the gradient, do the same thing of 2nd and 3rd properties, edit the color and the color-stop */
7}
1
2 background: #bdc3c7; /* fallback for old browsers */
3 background: -webkit-linear-gradient(to right, #bdc3c7, #2c3e50); /* Chrome 10-25, Safari 5.1-6 */
4 background: linear-gradient(to right, #bdc3c7, #2c3e50); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
5
1Here a codePen with cool gradient animations:
2https://codepen.io/DevLorenzo/pen/ExgpvJM