开发者

decreasing font size in a text box dynamically

Is it possible to dynamically control the font size in a text area / text box开发者_开发百科 so it decreases while the user types? (ie the character i+1 is smaller than character i)

Thanks


No, it's not possible in a text area or a text box. The font-size specified for those controls will affect all text in them. You could, however, achieve the effect by using a regular <div> and making its content editable, as is done in WYSIWYG editors.

Here's a simple example.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜