图像地板淡入淡出颜色与网页的背景颜色混合?

时间:2017-05-21 04:56:52

标签: javascript jquery html css3 sass

如何设置图像叠加层以匹配网页的背景色? Here's an example

1 个答案:

答案 0 :(得分:1)

您可以使用background-blend-mode: overlay;。见下面的例子:



.box {
  background-image: url(https://i.stack.imgur.com/pjKxM.jpg);
  height: 300px;
  width: 300px;
  background-color: #5e9bbf;
  background-blend-mode: overlay;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

<div class="box"></div>
&#13;
&#13;
&#13;