<style> div{ height: 100px; background: #F00; transition: background-color 0.5s; } div:hover{ background: #0F0; } </style> <div></div>