简体   繁体   English

使用身体图像背景制作颜色叠加

[英]Making a color overlay with body image background

Im trying to make a color overlay with an image css like this我试着做一个颜色叠加使用的图像等的CSS

CSS CSS

body {
  background-image : url("bg.png");
  background-repeat: no-repeat;
  background-attachment: fixed;  
  background-size: cover;
}

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM