var box = document.getElementById( 'box' ); var name = cssProp( 'transform' ); if( name ){ box.style[name] = 'rotate(20deg)'; }