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

Code Example 1

background-color: rgba(255, 0, 0, 0.5);

Code Example 2

img {
  opacity: 0.5;
}

Learn ReactJs, React Native from akashmittal.com