<div class="a-box">
<div class="img-container">
<div class="img-inner">
<div class="inner-skew">
<img src="https://images.unsplash.com/photo-1584791097929-aa825fe8e1e1?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&ixid=eyJhcHBfaWQiOjE0NTg5fQ">
</div>
</div>
</div>
<div class="text-container">
<h3>A blue bird</h3>
<div>
This a demo experiment to skew image container. It looks good.
</div>
</div>
body {
text-align: center;
padding: 30px;
background: #f8f4f2;
font-family: Arial;
}
.a-box {
display: inline-block;
width: 240px;
text-align: center;
}
.img-container {
height: 230px;
width: 200px;
overflow: hidden;
border-radius: 0px 0px 20px 20px;
display: inline-block;
}
.img-container img {
transform: skew(0deg, -13deg);
height: 250px;
margin: -35px 0px 0px -70px;
}
.inner-skew {
display: inline-block;
border-radius: 20px;
overflow: hidden;
padding: 0px;
transform: skew(0deg, 13deg);
font-size: 0px;
margin: 30px 0px 0px 0px;
background: #c8c2c2;
height: 250px;
width: 200px;
}
.text-container {
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.2);
padding: 120px 20px 20px 20px;
border-radius: 20px;
background: #fff;
margin: -120px 0px 0px 0px;
line-height: 19px;
font-size: 14px;
}
.text-container h3 {
margin: 20px 0px 10px 0px;
color: #04bcff;
font-size: 18px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.