用 Scrolling 和定位占位符修改 TextArea。

Modifying TextArea with Scrolling, and positioning placeholder.

所以,基本上我正在尝试创建一个输入栏,它将允许用户输入一个帐号列表,然后可以将其发送以查询 Web 服务。所以输入栏很长,几乎延伸到页面底部(因为用户一次最多可以输入 100 个帐号),并且在导航标签内以确保它安全地位于视图的左侧。

目前,占位符横跨中间,而不是我想要的顶部,不滚动(垂直),我需要能够按 Enter 并在输入中创建一个新行酒吧 - 不提交。我知道,这很多。

目前,我的代码如下所示:

<div id = “input”>
<form>
    <input type = “text” id = “Actinput” class = “form-control” placeholder = “Paste/Import Here” required style = “ display : table; height : 45h; resize: none; border-radius: 0px; overflow-y: scroll”>
</form>
</div>

任何帮助都将不胜感激。谢谢

您可以使用 <textarea> 而不是 <input type="text">