<div class="box-big">
  <span class="del">×</span>
  <div class="box action">
  </div>
</div>
body {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.3);
}

.box-big {
  position: relative;
  width: 150px;
  height: 150px;
}

.box {
  position: relative;
  background-color: white;
  width: 150px;
  height: 150px;
  border-radius: 16px;
  box-shadow: 0 0 5px #0000001a;
}

.del {
  z-index: 3;
  right: -10px;
  top: -10px;
  font-size: 14px;
  position: absolute;
  height: 20px;
  width: 20px;
  text-align: center;
  line-height: 20px;
  border-radius: 50%;
  color: rgb(250, 83, 83);
  background-color: rgba(114, 114, 114, 0.4);
}

.action {
  animation: action ease .3s infinite;
}

@keyframes action {
  0% {
    transform: rotate(0) scale(1);
  }
  20% {
    transform: rotate(-2deg) scale(1);
  }
  60% {
    transform: rotate(0) scale(1);
  }
  80% {
    transform: rotate(2deg) scale(1);
  }

  100% {
    transform: rotate(0) scale(1);
  }
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.