<html>
<head>
<style>
input[type=text] {
width: 100px;
transition: width .35s ease-in-out;
transition: width .35s ease-in-out;
}
input[type=text]:focus {
width: 250px;
}
</style>
</head>
<body>
<h1>The width Property</h1>
<p>Set the width of the input field to 100 pixels. However, when the input field gets focus, make it 250 pixels wide:</p>
Search: <input type="text" name="search">
</body>
<!-- Mirrored from www.w3schools.com/cssref/tryit.php?filename=trycss_dim_width_inputfocus by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:38:29 GMT -->
</html>