Make the input part [text] gray?

You know how Google instantly when they submit offers, the bit of the search field that they proposed turns gray, but the bit that you typed is always black. Well, I want to achieve the same effect with a similar system. How can i do this?

Thanks Fela

+3
source share
3 answers

You will need 2 text fields located one above the other. Make the text box on top a transparent background (this will be the select text box). Then set the color of the text box to gray (it will be a text box with the proposal displayed).

+3
source

, Google Instant, , , , . , : div, . :

<div>
<span class="originaltext">hello</span>
</span class="suggested">world</span>
</div>
0

You can start with gray background-imageand set its propertybackground-position

0
source

All Articles