C
C
Cheizer2019-10-03 17:17:49
css
Cheizer, 2019-10-03 17:17:49

Why doesn't SVG mask work with PNG?

Friends, please explain why the PNG mask does not work? Why does the main image become hazy? I can not understand. Here is such an ambush. PNG Mask
5d960292c9211929793680.png
drawing itself Doing it right
mountains-hero.jpg
5d96033fdf838564336539.png

<svg width="500" height="500" viewBox="0 0 500 500">
  <defs>
    <mask id="mask">
      <image width="500" height="500" xlink:href="https://i.ibb.co/BgqMrqh/Image4m.png" />
    </mask>
  </defs>
  <image mask="url(#mask)" width="500" height="500" xlink:href="https://c402277.ssl.cf1.rackcdn.com/photos/2325/images/hero_small/mountains-hero.jpg" />
</svg>

Here is a live example https://codepen.io/Cheizer/pen/ExxYNZr
Maybe I'm not doing the PNG mask correctly? :( If so, how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cheizer, 2019-10-04
@Cheizer

decision prompted Ankhena to make the mask white

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question