JSFiddle - React, Tailwind, and code Playground
by Alen Doe
HTML
<div class="test">hello</div>
CSS
.test {
display: inline-block;
background: gray;
width: 100px;
height: 50px;
transform: scale(1);
position: relative;
left: 50%;
margin-top: 100px
}
JavaScript
var a = $('.test');
$({scale: 1}).animate({
scale: 2
}, {
duration: 2000,
step: function(now, fx) {
a.css('transform', 'scale(' + now + ')')
}
}, 'linear');