<button class="cp_button03">button</button>
.cp_button03 {
position: relative;
display: flex;
justify-content: center;
align-items: center;
width: 160px;
padding: 1em;
cursor: pointer;
color: #52c11f;
background: transparent;
border: 1px solid #52c11f;
border-radius: 0;
transition: color 0.4s, transform 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
z-index: 1;
}
.cp_button03:hover {
color: #ffffff;
border: 1px solid #52c11f;
}
.cp_button03:before,
.cp_button03:after {
position: absolute;
top: 0;
left: 0;
content: '';
display: block;
width: 100%;
height: 100%;
z-index: -1;
}
.cp_button03:before {
background-color: #52c11f;
transition: transform cubic-bezier(1, 0, 0, 1) 0.4s;
transform: scaleY(0);
transform-origin: top center;
}
.cp_button03:after {
top: -6px;
left: -6px;
border: 1px solid #52c11f;
transition: transform cubic-bezier(0.645, 0.045, 0.355, 1) 0.4s;
}
.cp_button03:hover:before {
border: 1px solid #52c11f;
transform: scaleY(1);
}
.cp_button03:hover:after {
border: 1px solid #52c11f;
transform: translate(6px, 6px);
}
.cp_button03:active {
transition-duration: 0.05s;
transform: translate(6px, 6px);
}
.cp_button03:active:after {
transition-duration: 0.05s;
transform: translate(0, 0);
}
.cp_button03:focus {
color: #52c11f;
border: 1px solid #52c11f;
}
.cp_button03:focus:hover {
color: #ffffff;
}
.cp_button03:focus:before {
background-color: #52c11f;
}