<div class="text">
<span>S</span>
<span>K</span>
<span>E</span>
<span>W</span>
<span></span>
<span>T</span>
<span>E</span>
<span>X</span>
<span>T</span>
</div>
body {
background-color: #fb9;
color: #aaa;
font-size: 40px;
}
.text {
display: flex;
justify-content: center;
margin-top: 50vh;
transform: translateY(-50%);
// margin: 250px auto;
text-align: center;
// border: 1px solid #000;
transition: transform .3s ease-in-out;
&:hover {
transform: rotateX(35deg), translateY(-50%);
span {
color: #ccc;
&:nth-child(odd) {
transform: skewY(15deg);
// background-color: #f00;
// box-shadow: 0 60px 20px rgba(0,0,0,0.1);
}
&:nth-child(even) {
transform: skewY(-15deg);
background-color: #f9f9f9;
color: #a6a6a6;
// box-shadow: 0 60px 20px rgba(0,0,0,0.1);
}
}
}
> span {
display: block;
background-color: #fff;
width: 120px;
height: 120px;
line-height: 120px;
transition: transform .3s ease-in-out, color .3s ease-in-out, background-color .3s ease-in-out;
box-shadow: 0 40px 50px rgba(0,0,0,0.1);
&:first-child {
border-radius: 5px 0 0 5px;
}
}
}
View Compiled
// https://www.youtube.com/watch?v=MH7rI6vuasE
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.