<style>
  * {
    box-sizing: border-box;
  }
  html, body {
    align-items: center;
    background: linear-gradient(45deg, #95a5a6, #f5ab53);
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    padding: 0;
    width: 100vw;
  }
  div {
    background: #fff;
    height: 50px;
    margin: 100px 40px;
    width: 50px;
  }
  input {
    cursor: pointer;
  }
</style>
<div></div>
<input type='range' min='0.1' step='0.1' max='5' value='1.5'/>
div {
  --scale: 1.5;
  animation: change 1s infinite cubic-bezier(.35,.71,.71,.35) 1s;
  transform: scale(var(--scale));
}

@keyframes change {
  50% {
    transform: scale(1);
  }
}
var input = document.querySelector('input')
var div = document.querySelector('div')
const update = (e) => {
  div.style.setProperty('--scale', e.target.value)
}
input.addEventListener('input', update)
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.