<a href=#><span>Button</span></a>
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #747;
}
a {
position: relative;
padding: 20px 40px;
background-color: #056;
color: #fff;
font-family: sans-serif;
text-decoration: none;
letter-spacing: 4px;
transform-style: preserve-3d;
border-radius: 60px;
transition: ease-in-out 1s;
}
a:hover {
transform: rotateX(360deg);
}
a span {
display: block;
font-weight: bold;
transform-style: preserve-3d;
transform: perspective(100px) translateZ(20px);
}
a::before {
content: '';
position: absolute;
top: 4px;
left: 6px;
right: 6px;
bottom: 4px;
border: 2px solid #fff;
border-radius: 60px;
transform-style: preserve-3d;
transform: perspective(700px) translateZ(20px);
}
a::after {
content: '';
position: absolute;
top: 2px;
left: 2px;
right: 2px;
bottom: 2px;
border: 2px solid #fff;
border-radius: 60px;
transform-style: preserve-3d;
transform: perspective(700px) translateZ(-20px);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.