<div class="container">
  <h3>CSS Transition</h3>
  <div class="box transition"></div>
</div>

<div class="container">
  <h3>CSS Animation</h3>
  <div class="box animation"></div>
</div>
@import url("https://fonts.googleapis.com/css?family=Gochi+Hand");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  background-color: #291642;
  font-family: "Gochi Hand", sans-serif;
  font-size: 100%;
  letter-spacing: 0.1rem;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;

  background: linear-gradient(to right, #44ea76 0%, #39fad7 80%, #39fad7 100%)
      no-repeat,
    url("https://lh4.googleusercontent.com/-3eBjuQpOGFw/U47yh_-OycI/AAAAAAAAI2U/uaU5pK49N1w/s1600/normal.jpg")
      no-repeat fixed;
  background-size: cover;
  background-blend-mode: hue;
}

.container {
  inline-size: 30vw;
  border-radius: 5px;
  margin: 0 1vh;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.3s ease;

  background-image: linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.5)
  );
  backdrop-filter: blur(3px);

  min-block-size: 50vh;

  display: flex;
  flex-direction: column;
  align-items: center;

  color: #212121;
  padding: 2vh;
}

h3 {
  margin-top: 2vh;
}

.box {
  width: 20vh;
  height: 20vh;
  background-color: #ff5722;
  border-radius: 100%;
  cursor: pointer;

  margin: auto;
}

.box.transition {
  transition: transform 0.2s linear;
}

.box.transition:hover {
  transform: scale(1.5, 1.5);
}

@keyframes boxScale {
  to {
    transform: scale(1.5, 1.5);
  }
}

.box.animation {
  transform-origin: center;
  animation: boxScale 2s linear infinite alternate;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.