<div class="bg">
<img class="img-polygon02" src="https://www.eyesofc.co.jp/webeyes/_demo/torarin/202104/sample.jpg" alt="サンプル画像">
</div>
.bg {
width: 320px;
max-height: 214px;
background-color: #003366;
}
img {
max-width: 320px;
width: 100%;
}
.img-polygon02 {
clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.