body{
margin: 0;
padding: 0;
}
.warp{
background-color: rgb(222, 230, 230);
width: 100vw;
height: 100vh;
overflow: hidden;
/* position: absolute; */
/*Avoid child element margin affecting outer elements, both overflow and position can be used*/
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
/* flex elastic layout centered (horizontal, vertical) */
}
.card{
width: 90vw;
height: 16vh;
background-color: darkcyan;
border-radius: 2vh;
margin: 2vh;
/* Text vertically centered */
/* text-align: center; */
/* line-height: 20vh; */
/*Relative position of the outer layer*/
/* position: relative; */
border-radius: 12px;
color: #ffc0cb;
cursor: pointer;
transition: all 1s ease;
display: block;
}
.one{
background-color: #8063e1;
background-image: linear-gradient(135deg, #bd7be8, #8063e1);
box-shadow: 20px 20px 60px rgba(34,50,84,0.5), 1px 1px 0px 1px #8063e1;
z-index: 5;
opacity: 0.9;
}
.two{
background-color: #3f58e3;
background-image: linear-gradient(135deg, #7f94fc, #3f58e3);
box-shadow: 20px 20px 60px rgba(34,50,84,0.5), 1px 1px 0px 1px #3f58e3;
z-index: 4;
opacity: 0.9;
}
.three{
background-color: #2c6fd1;
background-image: linear-gradient(135deg, #21bbfe, #2c6fd1);
box-shadow: 20px 20px 60px rgba(34,50,84,0.5), 1px 1px 0px 1px #2c6fd1;
z-index: 3;
opacity: 0.9;
}
.four{
background-color: #352f64;
background-image: linear-gradient(135deg, #415197, #352f64);
box-shadow: 20px 20px 60px rgba(34,50,84,0.5), 1px 1px 0px 1px #352f64;
z-index: 2;
opacity: 0.9;
}
.five{
background-color: #63e1b7;
background-image: linear-gradient(135deg, #4e9666, #63e1a6);
box-shadow: 20px 20px 60px rgba(34,50,84,0.5), 1px 1px 0px 1px #63e178;
z-index: 1;
opacity: 0.9;
}
.card .title {
/*Absolute position of the inner layer*/
/* position: absolute; */
border-bottom: rgb(149, 158, 158) 1px solid;
width: calc(100% - 2vw);
height: 25%;
padding-left :2vw;
font-size: 26px;
font-weight: bold;
}
.card .content {
/* position: absolute; */
width: 100%;
height: 74%;
/* Text vertically centered */
/* text-align: center; */
line-height: 11vh;
padding-left :2vw;
font-weight: 700;
font-size: 16px;
}
.card:hover {
transform: rotateX(0deg) rotateY(0deg) rotate(0deg) translate(15px, 0px);
opacity: 0.6;
}
.card:hover:after {
transform: translateX(100%);
transition: all 1.5s ease-in-out;
}
.card::after {
content: '';
position: absolute;
top: 0px;
left: 0;
width: 100%;
height: 100%;
transform: translateX(-100%);
background-image: linear-gradient(60deg, rgba(255,255,255,0) 20%, rgba(255,255,255,0.1), rgba(255,255,255,0) 80%);
}