Check out example codes for "gradients w3". It will help you in understanding the concepts better.

Code Example 1

#grad {
  background-image: linear-gradient(red, yellow);
}

Learn ReactJs, React Native from akashmittal.com