Simple demo, click to switch the background color, and attach the code.
.html file
<div> class='red' id="box">美美哒!...........</div>
.css file
.red{ width:100px; height:100px; background-color:red; border-radius:0 70px 0 60px ; transition-duration:1s;}.yellow{ width:150px; height:150px; border-radius:80px 0 100px 0; transition-duration:1s; background-color:yellow;}
.js file
window.onload = function(){ var box = document.getElementById('box'); box.onclick = toYellow;};function toRed(){ this.className ='red'; this.onclick = toYellow;}function toYellow(){ this.className ='yellow'; this.onclick = toRed;}