<style>
  * {
    box-sizing: border-box;
  }
  html, body {
    align-items: center;
    background: linear-gradient(45deg, #db05ab, #00e640);
    display: flex;
    justify-content: center;
    margin: 0;
    min-height: 100vh;
    padding: 0;
    width: 100vw;
  }
  div {
    background-color: #fafafa;
    height: 300px;
    width: 300px;
  }
</style>
<div></div>
div {
  animation-name: shrink;
  animation-duration: .5s;
  animation-timing-function: ease-out;
  animation-fill-mode: none;
  animation-delay: 1s;
}

@keyframes shrink {
  to {
    transform: scale(0.5);
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.