<div class="center">
<div class="button">
<span class="button__inner">
Button Out.
</span>
</div>
</div>
body {
background-color: black;
}
.center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.button {
background-color: transparent;
cursor: pointer;
display: inline-block;
margin: 15px auto;
white-space: nowrap;
position: relative;
&:hover {
&:after,
&:before {
border-color: #727272;
}
.button__inner {
border-left: 1px solid #727272;
border-right: 1px solid #727272;
&:after,
&:before {
background-image: repeating-linear-gradient(
-45deg,
#727272,
#727272 1px,
transparent 0,
transparent 16px
);
}
}
}
&:after,
&:before {
border-color: white;
border-style: solid;
content: "";
display: block;
height: 16px;
}
&:before {
top: 0;
right: 0;
border-width: 1px 1px 0 0;
margin-left: 16px;
}
&:after {
bottom: 0;
left: 0;
border-width: 0 0 1px 1px;
margin-right: 16px;
}
}
.button__inner {
display: block;
padding: 0 35px;
margin: -1px 0;
font-family: "Roboto", sans-serif;
font-size: 14px;
text-align: center;
text-transform: uppercase;
line-height: 16px;
background-color: transparent;
border-left: 1px solid #fff;
border-right: 1px solid #fff;
color: #fff;
&:after,
&:before {
border-style: solid;
border-color: transparent;
border-width: 0 0 16px 16px;
content: "";
position: absolute;
background-size: 16px 24px;
background-image: repeating-linear-gradient(
-45deg,
#fff,
#fff 1px,
transparent 0,
transparent 16px
);
}
&:before {
top: 0;
left: 0;
}
&:after {
bottom: 0;
right: 0;
transform: rotate(180deg);
}
}
View Compiled
This Pen doesn't use any external JavaScript resources.