how to rotate a div with there element in javascript code example Example: rotate a div using javascript div.style.tranform = 'rotate(' + angleInDegrees + 'deg);';