【发布时间】:2021-12-25 11:25:42
【问题描述】:
我正在尝试使用像 this 这样的图像 css 进行颜色叠加
CSS
body {
background-image : url("bg.png");
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
【问题讨论】:
我正在尝试使用像 this 这样的图像 css 进行颜色叠加
body {
background-image : url("bg.png");
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
【问题讨论】:
使用背景 CSS 属性,这是一个示例。
body {
background:
/* top, transparent red, faked with gradient */
linear-gradient(
rgba(255, 0, 0, 0.45),
rgba(255, 0, 0, 0.45)
),
/* bottom, image */
url(image.jpg);
}
信用:https://css-tricks.com/tinted-images-multiple-backgrounds/
【讨论】: