div{ width: 200px; height: 200px; background-color: #f00; transition: all 2s; } div:hover{ background-color: #00f; transform: translateX(500px) translateY(500px) scale(0.8) rotate(360deg); }