Favourite Cocktail by

Justin

On: 15 Jul 2016

<div class='drink'>
  <div class='garnish'></div>
</div>
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #001a1a;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.drink {
  position: relative;
  width: 200px;
  height: 210px;
  border-radius: 2px 2px 10px 10px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 15px 0px 30px rgba(255, 255, 255, 0.2), 3px 7px 10px -2px rgba(0, 0, 0, 0.4), inset -15px 0px 20px rgba(0, 0, 0, 0.2), inset 0px -10px 5px rgba(77, 0, 0, 0.4), 0px 0px 50px 10px rgba(255, 255, 255, 0.1);
  align-self: center;
  overflow: hidden;
}
.drink:before, .drink:after {
  position: absolute;
  content: '';
}
.drink:before {
  bottom: 5%;
  left: -25%;
  width: 150%;
  height: 50%;
  background: rgba(77, 0, 0, 0.4);
  border-radius: 30%;
  animation: wave 4s ease-in-out infinite;
  -webkit-animation: wave 4s ease-out infinite;
}
.drink:after {
  width: 45%;
  height: 40%;
  border-radius: 4px;
  left: 15%;
  bottom: 20%;
  transform: rotate(10deg);
  box-shadow: inset 10px 0px 10px rgba(255, 255, 255, 0.5), inset -5px 0px 2px rgba(255, 255, 255, 0.1), inset 0px -10px 10px rgba(255, 255, 255, 0.1);
  animation: float 4s ease-in infinite;
  -webkit-animation: float 4s ease-in infinite;
}

@keyframes wave {
  0%,100% {
    transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg) translateX(10px);
  }
  75% {
    transform: rotate(5deg);
  }
}
@-webkit-keyframes wave {
  0%,100% {
    transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg) translateX(10px);
  }
  50% {
    transform: rotate(5deg);
  }
}
@-webkit-keyframes float {
  25% {
    bottom: 25%;
    transform: translateX(20px);
  }
  50% {
    transform: rotate(-10deg);
  }
  75% {
    bottom: 20%;
    transform: rotate(20deg) translateX(-12px);
  }
}
.garnish {
  width: 40%;
  height: 20%;
  border-radius: 50%;
  border-top: 3px solid rgba(230, 149, 0, 0.4);
  box-shadow: 0px -3px 0px rgba(233, 160, 26, 0.2);
  transform: rotate(-40deg);
  right: -10px;
  position: absolute;
  top: 50%;
  animation: rise 4s ease-in-out infinite;
  -webkit-animation: rise 4s ease-in-out infinite;
}

@keyframes rise {
  50% {
    transform: translateY(-3px);
  }
}

17