Check out example codes for "affect top div opacity without affecting childrne". It will help you in understanding the concepts better.

Code Example 1

#container {
    border: solid gold 1px;   
    width: 400px;
    height: 200px;

#box {
    border: solid silver 1px;
    margin: 10px;
    width: 300px;
    height: 100px;
  	transition: 2s background;

// if you then want to apply an animation, do it on background-color instead of opacity

Learn ReactJs, React Native from