Can I set an opacity only to the background image of a div?

后端 未结 8 1314
轮回少年
轮回少年 2020-11-22 11:09

Let\'s say I have

Hi there

I want to put a background-image and give it an opacit

8条回答
  •  名媛妹妹
    2020-11-22 11:48

    So here is an other way:

    background-image: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)), url("your_image.png");
    

提交回复
热议问题