How to have an Input submit value on several lines in HTML

后端 未结 4 435
春和景丽
春和景丽 2021-02-04 18:52

Does anybody know if there is a way to display the text value of an button in HTML on several lines ?

I mean, if you lock the width of the button in the associated CSS

4条回答
  •  滥情空心
    2021-02-04 19:14

    Split the text on the button by adding where you want to break the line the following sequence: \r\n For example: will display a submit button with caption Line1 on top of the Line2.

    For beginners: \r\n will not be displayed, but used by the browser to understand that you want to break the line; it is not necessary to leave empty spaces on the left or the right of \r\n

提交回复
热议问题