<div class="wrapper">
<div class="button">WHATEVER</div>
<div class="border top"></div>
<div class="border left"></div>
<div class="border right"></div>
<div class="border bottom-left"></div>
<div class="border bottom-right"></div>
</div>
@white: #F1F1F1;
@black: #262626;
html, body {
height: 100%;
overflow: hidden;
text-align: center;
background: @white;
}
.wrapper {
position: relative;
width: 320px;
height: 60px;
top: 50%;
transform: translateY(-50%);
margin: 0 auto;
.button {
width: 320px;
height: 60px;
color: @black;
font-family: 'Roboto Condensed';
font-size: 20px;
font-weight: 400;
line-height: 60px;
letter-spacing: 8px;
}
.border{
background : @black;
}
.top {
position: absolute;
top: 0px;
left: 50%;
width: 0;
height: 2px;
margin: auto;
opacity: 0;
transition: all .2s linear .3s;
}
&:hover .top {
left: 0;
width: 100%;
opacity: 1;
transition: all .2s linear;
}
.right {
position: absolute;
top: 0;
right: 0;
width: 2px;
height: 0;
margin: auto;
transition: all .1s linear .2s;
}
.left {
position: absolute;
top: 0;
left: 0;
width: 2px;
height: 0;
margin: auto;
transition: all .1s linear .2s;
}
&:hover .right, &:hover .left {
transition: all .1s linear .2s;
height: 100%;
}
.bottom-left {
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
margin: auto;
transition: all .2s linear;
}
.bottom-right {
position: absolute;
bottom: 0;
right: 0;
width: 0;
height: 2px;
margin: auto;
transition: all .2s linear;
}
&:hover .bottom-left, &:hover .bottom-right {
transition: all .2s linear .3s;
width: 100%;
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.