<div class="target"></div>
.target {
  width: 100px;
  height: 100px;
  background: blue;
  border-radius: 0px;
  transition: border-radius 0.5s;
}

.round {
  border-radius: 50px;
}
const div = document.querySelector('.target');

div.addEventListener('click', function() {
  this.classList.toggle('round');  
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.