<p><label>Rotation<br><input id="rotation" type="range" value="0" max="360" oninput="transformSquare()"></label></p>
<div id="square" style="width:100px;height:100px;background:gold"></div>
<script> const transformSquare = () => square.style.transform = `scale(${scale.value}) rotate(${rotation.value}deg)`; transformSquare(); </script>
Part of why IDs are supposed to be unique on a page.
<p><label>Rotation<br><input id="rotation" type="range" value="0" max="360" oninput="transformSquare()"></label></p>
<div id="square" style="width:100px;height:100px;background:gold"></div>
<script> const transformSquare = () => square.style.transform = `scale(${scale.value}) rotate(${rotation.value}deg)`; transformSquare(); </script>