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

Code Example 1

.opacity30 {
  opacity: 0.3;
  filter: alpha(opacity=30); /* For IE8 and earlier */
}

Code Example 2

.div{
  opacity: 0.8; /* 1 means fully visible, 0 means invisible */
}

Code Example 3

img {
  opacity: 0.5;
}

Code Example 4

div {
  width: 200px;
  height: 200px;
  display: block;
  position: relative;
}

div::after {
  content: "";
  background: url(image.jpg);
  opacity: 0.5;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  position: absolute;
  z-index: -1;   
}

Code Example 5

div {
  background-color: yellow;
}

.light {
  opacity: 0.2; /* Der Text kann kaum über dem Hintergrund gelesen werden */
}

.medium {
  opacity: 0.5; /* Der Text ist besser über dem Hintergrund lesbar */
}

.heavy {
  opacity: 0.9; /* Der Text ist sehr deutlich über dem Hintergrund lesbar */
}

Code Example 6

img {
  opacity: 0.5;
}

Learn ReactJs, React Native from akashmittal.com