Pure CSS animated balloon

by dumptyd

HTML

<div class="wrapper">.
  <div id="balloon">
    <div class="dot"></div>
  </div>
</div>

CSS

.wrapper {
  min-height: 300px;
  min-width: 300px;
  margin: 0 auto;
  height: 100vh;
  width: 100vw;
  background-color: teal;
  position: relative;
}

#balloon {
  height: 100px;
  width: 75px;
  background-color: #ff9469;
  border-radius: 100% 100% 90% 90%;
  position: absolute;
  top: 50px; left: 100px;
  animation: move 2s infinite alternate linear;
}

.dot {
  position: absolute;
  top: 20%; left: 30%;
  height: 5px; width: 5px;
  border-radius: 50%;
  background-color: #ffd8c2;
}

/* baloon bottom */
#balloon:before {
  position: absolute;
  top: calc(100% - 2px); left: calc(50% - 7.5px);
  height: 15px; width: 15px;
  border-radius: 90% 90% 50% 50%;
  background-color: #ff9469;
  content: '';
}

/* balloon knot */
#balloon:after {
  position: absolute;
  top: calc(100% + 13px); left: calc(50% - 0.5px);
  height: 100px; width: 1px;
  border-radius: 0 0 40% 40%;
  background-color: #f0f0f0;
  content: '';
}

@keyframes move {
  from {
    transform: translateX(15px);
  }
  to {
    transform: translateX(-15px);
  }
}