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#grad {
2 background-image: linear-gradient(to right, #f1b1b1 , #82e6e8);
3
4}
1/* Add the class name insted of class */
2.class {
3 background: linear-gradient(to top, #000000, #fffffff);
4}
1#gradient {
2 background-image: linear-gradient(180deg, black, red);
3}
4/* can be applied in many places, as your <body> background or a <div> etc */
1/* A gradient tilted 45 degrees,
2 starting blue and finishing red */
3linear-gradient(45deg, blue, red);
4
5/* A gradient going from the bottom right to the top left corner,
6 starting blue and finishing red */
7linear-gradient(to left top, blue, red);
8
9/* Color stop: A gradient going from the bottom to top,
10 starting blue, turning green at 40% of its length,
11 and finishing red */
12linear-gradient(0deg, blue, green 40%, red);
13
14/* Color hint: A gradient going from the left to right,
15 starting red, getting to the midpoint color
16 10% of the way across the length of the gradient,
17 taking the rest of the 90% of the length to change to blue */
18linear-gradient(.25turn, red, 10%, blue);
19
20/* Multi-position color stop: A gradient tilted 45 degrees,
21 with a red bottom-left half and a blue top-right half,
22 with a hard line where the gradient changes from red to blue */
23linear-gradient(45deg, red 0 50%, blue 50% 100%);
1<style>
2
3 div{
4 border-radius: 20px;
5 height: 400px;
6 margin: 50 auto;
7 background: repeating-linear-gradient(
8 45deg,
9 yellow 0px,
10 yellow 40px,
11 black 40px,
12 black 80px
13 );
14 }
15
16</style>
17
18<div></div>
19