【发布时间】:2018-05-10 23:53:05
【问题描述】:
我在 html 中使用 Input 标签,我希望输入框的高度更大。我将其设置为 200 像素。 我的代码是:
<input type="text" class="form-control" name="description" placeholder="Enter description"
[(ngModel)]="description" style="height:200px" >
它起作用了,但是占位符句子和书写光标从中间开始,如上图所示。 如何在 html 中输入的左上角设置书写光标 我试过这个“vertical-align:text-top,但没用!
【问题讨论】:
-
输入是单行的。如果您想要多行文本,请使用 textarea 元素。
-
或contentEditable div
标签: html typescript input alignment