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.
精彩评论