I am trying to make an animation on hover of a rectangle. What I am trying to achieve is to make the Rectangle take the full height on tilt like it is shown and I don't want to be straighten. This is what I've done so far. I also used transform matrix but I didn't have good result
.square {
position: absolute;
width: 100px;
height: 100px;
top: 50%;
left: 50%;
background-color: black;
border: 1px solid black;
width: 100px;
height: 8px;
background-color: rgba(252, 207, 39, .2);
-webkit-transform: skew(-25deg);
-moz-transform: skew(-25deg);
-ms-transform: skew(-25deg);
-o-transform: skew(-25deg);
transform: skew(-25deg);
transition: transform 1s;
}
.square:hover {
transform: scaleY(50);
}
<div class="square"></div>