Set opacity of background image without affecting child elements

前端 未结 15 2568
闹比i
闹比i 2020-11-22 01:39

Is it possible to set the opacity of a background image without affecting the opacity of child elements?

Example

All links in the footer need a custom bull

15条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 02:34

    If you have to set the opacity only to the bullet, why don't you set the alpha channel directly into the image? By the way I don't think there is a way to set the opacity to a background image via css without changing the opacity of the whole element (and its children too).

提交回复
热议问题