Unusual shape of a textarea?

后端 未结 10 865
無奈伤痛
無奈伤痛 2020-11-29 15:03

Usually textareas are rectangular or square, like this:

\"Usual

But I want a custom-shaped

10条回答
  •  半阙折子戏
    2020-11-29 15:28

    That's not possible sire! A textarea is generally a rect or square box, where you can type in.

    However, to make something like that you can use 2 textarea's and then give them a specified width and height. Otherwise I don't think its gonna happen!

    Second method would be to make an editable element.

    http://jsfiddle.net/afzaal_ahmad_zeeshan/at2ke/

    The code is:

    This text can be edited by the user.

    Using this, you can make any element editable! You can give dimensions to it, and it will work! You will get it just as a textarea.

    Reference: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_Editable

提交回复
热议问题