0

Sticky position and clip-path Problem

In program used a sticky position and add images with clip-path property. Main error is that image with clip-path element over lap the sticky position element. Please help to solve it and run program in chrome https://code.sololearn.com/WVNL62npCHv8/?ref=app

9th Mar 2020, 7:26 AM
Divesh Aggarwal
Divesh Aggarwal - avatar
4 Respuestas
+ 2
You could use the z-index property to display the sticky element above the image if that's what you want to achieve.
9th Mar 2020, 10:36 AM
Aaron Eberhardt
Aaron Eberhardt - avatar
+ 2
Divesh Aggarwal I think the image is displayed above because it was declared later. Tags later in the document are usually rendered above... Also clip-path probably doesn't change the box size so the box-shadow property does not clip around the image.
9th Mar 2020, 2:37 PM
Aaron Eberhardt
Aaron Eberhardt - avatar
0
Yes it will work ( just forgot about the z-index ) but i really want to know why is that happen. why image with clip-path property overlaps the sticky element.
9th Mar 2020, 12:42 PM
Divesh Aggarwal
Divesh Aggarwal - avatar
0
also box-shadow property is not working with clip-path property.
9th Mar 2020, 1:14 PM
Divesh Aggarwal
Divesh Aggarwal - avatar