react-native style opacity for parent and child

前端 未结 6 1817
再見小時候
再見小時候 2021-02-05 00:03

react-native : I have one View and the child of View is an Image , I applied opacity: 0.5 for View and opacity: 0.9 for an Image but it doesn\'t apply for Image ,the parent opac

6条回答
  •  醉话见心
    2021-02-05 00:04

    React-Native 0.60+

    There is a new opacity prop that you can pass in:

    
    

    React-Native 0.59.x and lower

    Like this (with 50% at the end of color hash):

     
    

    Or RGBa way:

    
    

提交回复
热议问题