I'm trying to show only a part of the image, but it takes up the height inside my box for the whole image when I only want to take up the height for the part I'm showing.
In my example code below, note the light blue background showing behind the image.
How can I prevent this?
span {
float: left;
background-color: lightblue;
}
img {
clip-path: polygon(0 0, 100% 0, 100% 64%, 0 64%);
}
<span>
<img src="//via.placeholder.com/350x150">
</span>