btn css

.btn{
  color: #222;
  position: relative;
  //top: 50%;
  //left: 50%;
  //transform: translate(-50%, -50%);
  text-transform: uppercase;
  letter-spacing: .2em;
  -webkit-transition: all .4s cubic-bezier(0.645, 0.045, 0.355, 1);
  transition: all .4s cubic-bezier(0.645, 0.045, 0.355, 1);
 // font-size: 0.875em;
  //width: 140px;
  //text-align: center;
  //padding: 10px 15px;
}

.btn:hover{
  //letter-spacing: 0;
  color: white
}

.btn:after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0;
  background: #6284FF;
  z-index: -1;
  -webkit-transition: all .4s cubic-bezier(0.645, 0.045, 0.355, 1);
  transition: all .4s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.btn:hover:after{
  height: 100%;
}
JSRUN notes