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

Code Example 1

background: linear-gradient(to left, #333, #333 50%, #eee 100%);

Code Example 2

.element {
    background: linear-gradient(90deg, pink 50%, cyan 50%);
}

Learn ReactJs, React Native from akashmittal.com