html - 将背景与两个部分的两种不同颜色相乘

标签 html css background-image background-color

我正在尝试应用两种不同的 background-colorbackground-blend-mode: multiply;。见图片: Image with two different multiplied colors .

我试过类似的东西 fiddle .

提前致谢!

最佳答案

* {
  padding: 0;
  margin: 0;
}
.wrap {
  background: url("https://static.pexels.com/photos/2324/skyline-buildings-new-york-skyscrapers.jpg") fixed no-repeat;
  background-size: cover;
  width: 100vw;
  height: 100vh;
  filter: grayscale(100%);
  position: relative;
}
.row {
  width: 100vw;
  height: 70vh;
  background-color: red;
  position: fixed;
  left: 0;
  top: 0;
  mix-blend-mode: multiply;
}
<div class="wrap">
</div>
<div class="row">
  <h1>
     Header
  </h1>
</div>

关于html - 将背景与两个部分的两种不同颜色相乘,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41526311/

相关文章:

html - utf-8/utf-16 转换

css - 什么是 flex 中的 Css "display:none"?

html - 重新定位背景以使其看起来像一只手在写字?

css - 如何在 Nuxt/Vue 中做内联线性渐变

javascript - onLoad 函数未执行

php - 通过前端(HTML、CSS、PHP、SQL)编辑信息和更新数据库

html - 在 Bootstrap 的页面上居中表格

css - Font-awesome caret up 和 caret down 堆叠在彼此之上

css - phonegap CSS 兼容性

html - 网格布局中每个 block 的背景图像 - 在 html 中没有 css