<div class="wrapper">
  <button class="slide_from_left">SLIDE FROM LEFT</button>
  <button class="slide_from_right">SLIDE FROM RIGHT</button>
  <button class="slide_from_top">SLIDE FROM TOP</button>
  <button class="slide_from_bottom">SLIDE FROM BOTTOM</button>
  <hr>
  <button class="grow_box">GROW BOX</button>
  <button class="grow_ellipse">GROW ELLIPSE</button>
  <button class="grow_skew_forward">GROW SKEW &rarr;</button>
  <button class="grow_skew_backward">GROW SKEW &larr;</button>
  <button class="grow_spin">GROW SPIN</button>
</div>
* {
  box-sizing: border-box;
}
body {
  font-family: "Open Sans";
  line-height: 1.618em;
  background: #2c3e50;
}
.wrapper {
  max-width: 65rem;
  width: 100%;
  margin: 1rem auto;
  padding: 1rem;
  text-align: center;
  background: #fff;
  border: 0.5rem solid #34495e;
}
hr {
  border: 0;
  border-bottom: 0.0625rem solid #bbb;
  margin: 1rem 0;
}
button {
  font-size: 1em;
  background: #3498db;
  color: #fff;
  border: 0.25rem solid #3498db;
  padding: 0.85em 0.75em;
  margin: 1rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
button:hover {
  color: #3498db;
}
button::after {
  content: "";
  background: #ecf0f1;
  position: absolute;
  z-index: -1;
  padding: 0.85em 0.75em;
  display: block;
}
button[class^="slide"]::after {
  transition: all 0.35s;
}
button[class^="slide"]:hover::after {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  transition: all 0.35s;
}
button.slide_from_left::after {
  top: 0;
  bottom: 0;
  left: -100%;
  right: 100%;
}
button.slide_from_right::after {
  top: 0;
  bottom: 0;
  left: 100%;
  right: -100%;
}
button.slide_from_top::after {
  left: 0;
  right: 0;
  top: -100%;
  bottom: 100%;
}
button.slide_from_bottom::after {
  left: 0;
  right: 0;
  top: 100%;
  bottom: -100%;
}
button[class^="grow"]::after {
  transition: all 0.3s ease;
}
button[class^="grow"]:hover::after {
  transition: all 0.3s ease-out;
}
button.grow_box::after {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  transform: scale(0, 0);
}
button.grow_box:hover::after {
  transform: scale(1, 1);
}
button.grow_ellipse::after {
  border-radius: 50%;
  left: -50%;
  right: -50%;
  top: -150%;
  bottom: -150%;
  line-height: 8.34em;
  transform: scale(0, 0);
}
button.grow_ellipse:hover::after {
  transform: scale(1, 1);
}
button.grow_skew_forward::after {
  left: -20%;
  right: -20%;
  top: 0;
  bottom: 0;
  transform: skewX(-45deg) scale(0, 1);
}
button.grow_skew_forward:hover::after {
  transform: skewX(-45deg) scale(1, 1);
}
button.grow_skew_backward::after {
  left: -20%;
  right: -20%;
  top: 0;
  bottom: 0;
  transform: skewX(45deg) scale(0, 1);
}
button.grow_skew_backward:hover::after {
  transform: skewX(45deg) scale(1, 1);
}
button.grow_spin::after {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  transform: scale(0, 0) rotate(-180deg);
}
button.grow_spin:hover::after {
  transform: scale(1, 1) rotate(0deg);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.