<div id="block">click me</div>
#block{
  	position:absolute;
    left: 50%;
    top: 50%;
    width: 100px;
    height: 100px;
    margin: -50px 0 0 -50px;
    background: #0c8;
    line-height: 100px;
    text-align: center;
    color: #fff;
    cursor: pointer;
}
  block.addEventListener('click', function(){
    var self = this, startTime = Date.now(),
        duration = 1000;
  	setInterval(function(){
      var p = (Date.now() - startTime) / duration;
      self.style.transform = 'rotate(' + (360 * p) +'deg)';
    }, 1000/60);
  });

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.