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
1background: linear-gradient(#333, #333 50%, #eee 100%);
2\\code for a basic gradient background
3 #grad {
4 background-image: linear-gradient(red, yellow);
5}
1The general syntax of linear-gradient is-
2background: linear-gradient(gradient direction, color1 , color2 , color3, .....);
3
4Forexample-
5background: linear-gradient(46deg,green,blue,yellow,pink);
6
7NOTE: (common mistake) we forget to write the semi-colon (;)
1background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("../images/cover.jpg");