Opacity bleeding into child divs

后端 未结 2 847
孤独总比滥情好
孤独总比滥情好 2021-01-24 02:27

I have nested div tags, and the idea is that the outer one contains a background picture, and then the inner ones have text over them. I\'d like to change the opacity on the bac

2条回答
  •  被撕碎了的回忆
    2021-01-24 02:47

    what you are trying to do cannot be done since nested divs will inherit the opacity property and it cannot be overridden

    and because you want a background-image and not a background-color the use of rbga() is not useful in this case

    so the best way i see it to use and transparent background image (gif, png) and let work that way.

提交回复
热议问题