button animation

by milenig

HTML

<div class="cont">
  <a href="#" class="btn">button</a>
</div>

CSS

* {
  margin: 0;
  padding: 0;
}

body {
  background: #1f1a25;
}

.cont {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  border: 3px solid #99bbff;
  color: #99bbff;
  text-decoration: none;
  text-align: center;
  padding: 5px;
  border-radius: 5%;
  width: 100px;
  height: 50px;
  line-height: 50px;
  transition: all .25s ease-in-out;
}

.btn:hover {
  border: 3px solid #7a95cc;
}

JavaScript

$('.btn').on('click', function() {
  $(this).toggleClass('is-active');
});