Transparency and overriding
I'm curious, if we have 3 elements on top of each other,
lets say blue is the lowest (takes the full screen), orange is in the middle (also takes the full screen), and on the top is the square elememt (like 400x400px) that's transparent
Can we do anything do make the square area show blue isntead of the orange? Aka somehow make the middle layer transparent from the square? Like piercing transparency? If that makes any sense?
Otherwise if the box is transparent we will just see orange
11 Replies
you probably will want to do that with a
clip-pathOh wait can I use an image for pathing perhaps? If any more complex shape is possible?
you can use svg paths
Clip path or masks. In other situations blend modes can work but I don’t believe this example is one of them
Aye so basically it cannot be done, it's fine tho thank ya : )
it can, we just told you how
It def can be done. Clip-path or masks.
Sorry to be confusing, I just mentioned blend modes as they are good to know about but not applicable with the colours you described. Forget I mentioned blend modes though.
Use masks or clip-path as epic suggested
as i read it OP wants to use an element to mask out a region of another element (so not a clippath or blendingmode)
The only way i can think of is with a svg filter that removes a specific color (in my case black) where the square area is a child with that color
https://codepen.io/MarkBoots/pen/yyOOMxG
(full code, might delete pen later)
God I was busy and forgor about this thread smh me
Thank ya both kindly @MarkBoots and @curiousmissfox ❤️
Whoever needs this, I'll just show here how resized elememts look so it's a bit clearer
Awesome job by MarkBoots


