2

I am making a website for one of our clients. Our designers used blending: multiply because it can be done in CSS these days. I have implemented it in the site but I can't get the requested result and just wanted to ask you people if it even possible.

Here's the case: I have a big header with images in the background. On top of that header floats a round div which has mix-blend-mode: multiply. This works as desired, but in this div there is text which is also blended. Can I keep this text "unblended"?

desired effect:
wanted effect

What it is now:
current situation

Thanks in advance!

Aditi Parikh
  • 1,522
  • 3
  • 13
  • 34
Bounder
  • 27
  • 1
  • 5

2 Answers2

7

Use a pseduo-element and apply the blend-mode to that instead of the parent div.

div.header {
  width: 100%;
  height: 300px;
  background-image: url(http://www.eikongraphia.com/wordpress/wp-content/BIG_Zira_Island_Copyright_BIG_1_Small.jpg);
}
div.info-bol {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  text-align: center;
  position: relative;
}
div.info-bol::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background-color: red;
  mix-blend-mode: multiply;
}
div.info-bol span {
  position: relative;
  top: 22%;
  font-size: 30px;
  font-weight: bold;
  color: white;
}
<div class="header">
  <div class="info-bol">
    <span>samenwerken<br>is meer dan<br>samen<br>werken</span>
  </div>
</div>
Paulie_D
  • 107,962
  • 13
  • 142
  • 161
0

You must take the span out, because mix-blend-mode affects all children.

You can try something like creating a clone, without background, and pushing it into position.

div.header{
  width: 100%;
  height: 300px;
  background-image: url(http://www.eikongraphia.com/wordpress/wp-content/BIG_Zira_Island_Copyright_BIG_1_Small.jpg);
}

div.info-bol{
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: red;
  mix-blend-mode: multiply;
  text-align: center;
  color: #fff;
}

div.info-bol-clone{
  position: relative;
  width: 200px;
  height: 200px;
  text-align: center;
  color: #fff;
  bottom: 200px;
}

div.info-bol-clone span{
  position: relative;
  top: 22%;
  font-size: 30px;
  font-weight: bold
}
<div class="header">
  <div class="info-bol">
  </div>  
  <div class="info-bol-clone">
    <span>samenwerken<br>is meer dan<br>samen<br>werken</span>
  </div>  
</div>
Edu
  • 2,354
  • 5
  • 32
  • 36