div { width: 100px; height: 100px; background: red; transition: width 2s; } div:hover { width: 300px; }