#square {
width: 160px;
height: 160px;
background: hotpink;
transition: width 2s, height 2s, transform 2s;
}

#square:hover {
width: 300px;
height: 300px;
transform: rotate(180deg);
}