Changing the opacity of background image in css

后端 未结 4 1295
-上瘾入骨i
-上瘾入骨i 2021-01-14 15:33

I saw some similar questions regarding this. But my approach is different and none of those works to me. That\'s why I\'m posting this. I want to change the opacity of backg

4条回答
  •  感情败类
    2021-01-14 16:15

    You can put the background to a separate

    :

    
        

    Then position and style to fill the entire content.

    #content {
        positon: relative;
    }
    
    #background-div {
        position: absolute;
        width: 100%;
        height: 100%
        opacity: 0.5;
        background: url(...);
    }
    

提交回复
热议问题