CSS: Semi-transparent background and an image

后端 未结 3 2085
无人及你
无人及你 2021-01-03 04:20
body {
  background-image: url(\'cloud.png\');
  background-color: rgba(255, 255, 255, 0.6);
}

I tried using the above to produce a semi-transparen

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-03 04:41

    background-color is placed underneath background-image, not above it (when rendered in the web-browser). To put a semi-transparent white block over an image, you will need to place another different HTML element on top of it with background-color.

提交回复
热议问题