<a href="#" class="cp_btn">button</a>
a.cp_btn {
position: relative;
display: inline-block;
width: 160px;
padding: 0.8em;
text-align: center;
text-decoration: none;
font-weight: bold;
color: #FBC02D;
border-top: 2px solid #FBC02D;
border-bottom: 2px solid #FBC02D;
}
a.cp_btn:before,
a.cp_btn:after {
position: absolute;
top: -7px;
width: 2px;
content: '';
height: calc(100% + 14px);
background-color: #FBC02D;
transition: .3s ease-in-out;
}
a.cp_btn:before {
left: 7px;
}
a.cp_btn:after {
right: 7px;
}
a.cp_btn:hover:before,
a.cp_btn:hover:after {
top: 0;
height: 100%;
}
a.cp_btn:hover:before{
left:0;
}
a.cp_btn:hover:after{
right: 0;
}