Set opacity of background image without affecting child elements

前端 未结 15 2469
闹比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:14

    Just to add to the above..you can use the alpha channel with the new color attributes eg. rgba(0,0,0,0) ok so this is black but with zero opacity so as a parent it will not affect the child. This only works on Chrome, FF, Safari and....I thin O.

    convert your hex colours to RGBA

提交回复
热议问题