Does anyone knows how can i make an effect like this in my search bar:
https://www.dropbox.com/help
<input type="text" name="input">
I mean the onFocus and onBlur effect with the text disappearing and appearing dynamically.
Thank you folks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They use CSS Animations on the color property:
Excerpt from their main.css:
You can mimic the effect using the
:focuspseudo selector on the input field with the previously mentioned definitions.If for some reason I wasn’t clear enough 🙂
http://jsfiddle.net/d9CMR/
More robust solution:
http://jsfiddle.net/d9CMR/3/
Update (with proper color change):
http://jsfiddle.net/d9CMR/6/
Source:
HTML
CSS
Script