JSFiddle - React, Tailwind, and code Playground

css3 button line animation with BS3

by Andrew Pougher

HTML

<h2 class="lead">
Button Animation Example
</h2>
<div class="main">
  <div class="button">
    <a href="#">enter</a>
    <div class="line-top">&nbsp;</div>
    <div class="line-right">&nbsp;</div>
    <div class="line-bottom">&nbsp;</div>
    <div class="line-left">&nbsp;</div>
  </div>
</div>

CSS

@import url("https://fonts.googleapis.com/css?family=Montserrat|Open+Sans:400,300");
body {
  background: #222222;
  font: 100 40px 'Open Sans';
  color: white
}
h2.lead{font-size:20px; text-transform: uppercase;letter-spacing:2px}
.button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 40px;
  margin: 70px 0 0 -60px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.button .line-top {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 1);
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
}

.button .line-right {
  position: absolute;
  bottom: 0;
  right: -1px;
  width: 1px;
  height: 0;
  background: rgba(255, 255, 255, 1);
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
}

.button .line-bottom {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 1);
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
}

.button .line-left {
  position: absolute;
  top: 0;
  left: -1px;
  width: 1px;
  height: 0;
  background: rgba(255, 255, 255, 1);
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
}

.button:hover .line-top {
  width: 120px;
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
}

.button:hover .line-right {
  height: 38px;
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  transition: all 0.5s...