<div class="container">
  <div class="item">linear</div>
  <div class="item">ease</div>
  <div class="item">ease-in</div>
  <div class="item">ease-out</div>
  <div class="item">ease-in-out</div>
  <div class="item">cubic-bezier()</div>
  <div class="item">steps()</div>
</div>
// Init~ Don't touch here!
$color: #121212;
body {
  padding: 20px;
  background-color: #121212;
  font-family: 'NanumSquareRound',sans-serif;
  color: $color;
}
.container {
  // border: 10px solid rgba(black, .1);
  border-radius: 10px;
  display: grid;
}
.item {
  width: 200px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
  position: relative;
  font-size: 16px;
  color: $color;
  font-weight: 900;
  text-shadow: 3px 0 0 rgba(white, .3);
  cursor: pointer;
  &:hover {
    filter: brightness(130%);
  }
  &::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    border: 4px solid $color;
    border-radius: 10px;
    box-sizing: border-box;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    z-index: -1;
  }
  $colors: (tomato, orange, limegreen, dodgerblue, hotpink, darkgray, crimson, orangered, lawngreen, aqua, royalblue, wheat, brown, gray, salmon, deeppink, gold, springgreen, slateblue, darkslategray);
  @each $color in $colors {
    $index: index($colors, $color);
    &:nth-child(#{$index})::before {
      background-color: rgba($color, .8);
    }
  }
  &::after {
    content: "";
    width: 10px;
    height: 50%;
    background: white;
    position: absolute;
    top: 16px;
    left: 16px;
    border-radius: 100px;
    opacity: .3;
    z-index: -1;
  }
}


// Test here!
.container {
  width: 500px;
  border: 4px solid rgba(255,255,255,.1);
}
.item {
  animation-name: heropy;
  animation-duration: 4s;
  animation-iteration-count: infinite;
  animation-delay: 1s;
}
.item:nth-child(1) { animation-timing-function: linear; }
.item:nth-child(2) { animation-timing-function: ease; }
.item:nth-child(3) { animation-timing-function: ease-in; }
.item:nth-child(4) { animation-timing-function: ease-out; }
.item:nth-child(5) { animation-timing-function: ease-in-out; }
.item:nth-child(6) { animation-timing-function: cubic-bezier(0.83, 0, 0.5, 1.73); }
.item:nth-child(7) { animation-timing-function: steps(4); }

@keyframes heropy {
  0% { width: 200px; }
  75% { width: 500px; }
  100% { width: 500px; }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.