开发者

Description texts in text input field

开发者 https://www.devze.com 2023-03-28 23:27 出处:网络
I would like to have description/addinional text inside text field. That text shouldnt disappear when user puts data into the field. It should just move along with it (like go more rig开发者_开发知识库

I would like to have description/addinional text inside text field. That text shouldnt disappear when user puts data into the field. It should just move along with it (like go more rig开发者_开发知识库ht and numbers/text that user has put in goes on left side).

Example: Normal state:

 _________
|_m2______|

User puts some data in:

 ________
|_22_m2__|

The lines there just represents border of input field :) And that m2 is the text that should stay there always.

Hopefully you understood what i'm after. Trying to google it too, but not sure what are right words to descripe thing like that:)

Thanks.


Is it for something like dimensions? Well, the simplest solution - put it on the right of the field.

A better solution: make a text input auto-grow as you type, borderless, and wrap inside of a div simulating the border - makes sense?

see http://jsfiddle.net/guard/jY7vx/3/ for almost working example

the problem I see there - the text "jumps" a bit when you type. could probably be done with better margin


Something like this

http://jsfiddle.net/zF4nW/

0

精彩评论

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

关注公众号