.nav1 a span {
background: #587285;
box-shadow: inset 0 3px #2f4351;
transition: background 0.6s;
transform-style: preserve-3d;
transform-origin: 0% 50%;
}
.nav1 a span::before {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #fff;
color: #2f4351;
content: attr(data-hover);
transform: rotateX(270deg);
transition: transform 0.6s;
transform-origin: 0 0;
}
.nav1 a span:hover{
background: #2f4351;
}
.nav1 a span:hover::before{
transform: rotateX(0deg);
}
.nav2 a {
color: #237546;
text-shadow: none;
transition: color 0.3s;
}
.nav2 a::before {
top: 0;
transform: translateY(-10px);
}
.nav2 a::after{
bottom: 0;
transform: translateY(10px);
}
.nav2 a::before, .nav2 a::after {
position: absolute;
width: 100%;
height: 2px;
background: #fff;
content: '';
opacity: 0;
transition: opacity 0.3s, transform 0.3s;
left: 0;
}
.nav2 a:hover{
color: #FFFFFF;
}
.nav2 a:hover::before,.nav2 a:hover::after{
transform: translateY(0px);
opacity: 1;
}
.nav3 a span{
position: relative;
display: inline-block;
width: 100%;
background: #e35041;
transition: transform 0.4s, background 0.4s;
transform-style: preserve-3d;
transform-origin: 50% 50% -100px;
}
.nav3 a:hover span{
transform:rotateY(-90deg);
background:#b53a2d;
}
.nav3 a span::before {
position: absolute;
top: 0;
left: 100%;
width: 100%;
height: 100%;
background: #b53a2d;
content: attr(data-hover);
transition: background 0.4s;
transform: rotateY(90deg);
transform-origin: 0 50%;
pointer-events: none;
}
.nav3 a:hover span::before{
background:#E35041;
}