transform追加したサンプル

/* <div id="b"></div> */
#b {
  width: 200px;
  height: 200px;
  margin: 50px;
  background: #c00;
  transition: -webkit-transform 1s;
  transition: transform 1s;
  transition: transform 1s, -webkit-transform 1s;
  -webkit-transform: rotate(0deg);
          transform: rotate(0deg);
}
var b = document.getElementById('b');
var isAnimation = b.style.animation !== undefined;
alert('isAnimation: ' + isAnimation);
setInterval(function() {
  b.style.transform = 'rotate(' + Math.floor(Math.random() * 360) + 'deg)';
}, 1000);