div { width: 100px; height: 100px; background-color: yellow; transition: all 0.3s ease; } div:hover { width: 300px; background-color: cyan; }
<div>hover me <br>width and bg will change with ease effect</div>