<form>
<input type="text" name="search" placeholder="Press here...! Search for example.com">
</form>
input[type=text] {
width: 130px;
box-sizing: border-box;
border: 2px solid #ccc;
border-radius: 4px;
font-size: 16px;
background-color: #007FFF;
background-image: url('search.png');
background-position: 10px 10px;
background-repeat: no-repeat;
padding: 12px 20px 12px 40px;
-webkit-transition: width 0.4s ease-in-out;
transition: width 0.4s ease-in-out;
color:#fff;
}
input[type=text]:focus {
width: 100%;
}
<iframe src="https://www.netbax.net/tab/creation/animated-search.html" style="width: 550px; height:550px;" frameborder="0"></iframe>