Check out example codes for "css gradient generator". It will help you in understanding the concepts better.

Code Example 1

/* Answer to: css gradient generator */

/*
  Here's a couple links you can use a nice triangle generator:
  https://cssgradient.io/
  https://www.colorzilla.com/gradient-editor/
  https://mycolor.space/gradient

  Or... you can make your own triangle in CSS! Just follow this guide:
  https://css-tricks.com/css3-gradients/
*/

Code Example 2

div {
    background: linear-gradient(to bottom, #33ccff 0%, #ff99cc 100%);
}

Code Example 3

background-image: linear-gradient(90deg, #020024 0%, #090979 35%, #00d4ff 100%);

Code Example 4

/* I know this has been answered by a lot of people */
/* But I just wanted to share this awesome color gradient with you*/
selector {
  background: linear-gradient(to bottom, rgba(255,0,100, 0.3), rgba(22,22,222, 0.9));
}
/* Paste this code in the css file */

Code Example 5

\\code for a basic gradient background
   #grad {
  background-image: linear-gradient(red, yellow);
}

Code Example 6

background: linear-gradient(to left, #333, #333 50%, #eee 100%);
\\code for a basic gradient background
   #grad {
  background-image: linear-gradient(red, yellow);
}

Learn ReactJs, React Native from akashmittal.com