JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>Fork
CSS
div{
width:200px;
height:200px;
margin-left:-100px;
margin-top:-100px;
opacity:1;
background:#333;
position:absolute; left:50%; top:50%;
}
JavaScript
var anim = {marginLeft: -150,marginTop: -150,width: 300,height: 300,opacity: 1};
$('div').animate({
marginLeft: "-200",
marginTop: "-200",
width: "400",
height: "400"
// Comment the line below to see difference
,opacity: 0.5
}, 2000).animate(anim, 2000);