Kevin Powell - CommunityKP-C
Kevin Powell - Community•3y ago•
4 replies
Vianney

clip-path Why does it work? šŸ¤”

Hi everybody. I'm very happy to reah the community.

I have a question about the clip-path property.
I have succeeded in managing what I want but I don't understand why it works!
Find below the codepen link:
https://codepen.io/vianneypercq/pen/MWLbROM

āž”ļø My question is: why as the gray background rises, it hides the gray text (inside .bx-1) and not the white text (inside .bx-2)?
Does the clip-path property have an impact on element stacking?
Why does it work? šŸ¤”

There's probably a subtlety I don't understand.
I couldn't find any useful information on MDN, stack overflow or elsewhere.

Thank you very much.
Was this page helpful?