input[type=text] { width: 100px; transition: width .35s ease-in-out; } input[type=text]:focus { width: 250px; }