I am facing an issue with the z-index of an image when using clip-path on a div. Can anyone help me solve this problem and easily adjust the z-index of the image? Thank you in advance.
Below is my code snippet:
.mymap {
background-image: url("https://images.pexels.com/photos/257360/pexels-photo-257360.jpeg?auto=compress&cs=tinysrgb&h=350");
background-repeat: no-repeat;
-webkit-clip-path: polygon(100% 0, 100% 80%, 0 80%, 0 23%);
clip-path: polygon(100% 0, 100% 80%, 0 80%, 0 23%);
}
.mymap {
height: 220px;
}
.men img {
width: 20%;
}
.men img {
z-index: 999;
position: relative;
}
<div class="mymap">
<div class="men">
<img src="https://i.pinimg.com/originals/1c/01/27/1c0127d19cdd75efb5a3eca4384658d5.png">
</div>
</div>
You can also view the codepen link here: https://codepen.io/anon/pen/JaQoOX
I would appreciate it if someone could review my code and advise on how to fix the z-index issue.