[英]Making a color overlay with body image background
Use the background CSS property, here's an example.使用背景 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);
}
Credit: https://css-tricks.com/tinted-images-multiple-backgrounds/信用: https : //css-tricks.com/tinted-images-multiple-backgrounds/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.