Edit in JSFiddle

<div id="b"></div>
#b {
  width: 10px;
  height: 10px;
  background-color: red;
}
b.style.transition = "all 1s cubic-bezier(0.5,-0.5,0.5,1.5)"
b.clientWidth
b.style.opacity = "0"
b.style.transform = "scale(2)"