JSFiddle - React, Tailwind, and code Playground
by Mark
HTML
<!-- Search, search, search and search! -->
<input type="search" name="search" placeholder=" Search" rel="search" />
CSS
input {
background-image: url(http://www.levenmetwater.nl/static/global/images/icon-search.png);
background-position: 10px center;
background-repeat: no-repeat;
border: 1px solid #ccc;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
padding: 10px 5px;
text-indent: 20px;
-webkit-transition: all 0.2s;
-moz-transition: all 2s;
transition: all 0.2s;
width: 95px;
}
input:focus {
/* Picked a random icon from Google */
background-position: -20px center;
text-indent: 0;
width: 50%;
}
JavaScript
// No JS :D