【问题标题】:Making a color overlay with body image background [duplicate]用身体图像背景制作颜色叠加[重复]
【发布时间】: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;
}

【问题讨论】:

    标签: html css


    【解决方案1】:

    使用背景 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/

    【讨论】:

      猜你喜欢
      • 2016-08-09
      • 1970-01-01
      • 2019-02-28
      • 2021-04-19
      • 2019-01-19
      • 2013-07-26
      • 1970-01-01
      • 2016-04-14
      相关资源
      最近更新 更多