开发者

a twitter-like signup form

can anyone point me in the direction of a tutorial that would get me similar functionality of twitter's signup form on their homepage?

specifically I'm referring to having the 'name' and 'passw开发者_如何学运维ord' etc. text fade when selected and disappear when you start typing.


Basically, you'll need some Javascript to perform the fadeout animation based on a focus event when the user starts to fill out the form. Here's a good tutorial and demo to get you started:

http://www.webstuffshare.com/2010/03/mask-your-input-forms-and-make-it-beauty/

http://webstuffshare.com/demo/InputShadow/

Hope this helps!


http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_placeholder

to having the 'name' and 'password' etc. text disappear

placeholder Attribute

The placeholder attribute specifies a short hint that describes the expected value of an input field (e.g. a sample value or a short description of the expected format).

The hint is displayed in the input field when it is empty, and disappears when the field gets focus.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜