gpt4 book ai didi

html - 输入/返回键不移动到文本区域中的新行

转载 作者:太空宇宙 更新时间:2023-11-04 01:48:33 24 4
gpt4 key购买 nike

我似乎在按下回车/返回键时失去了默认的文本区域行为。我希望按键将光标移动到下一行,但它只是插入了几个空格。必须是我的 css 规则中的内容,但我不知道它是什么。

button, input, textarea, select {
outline: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
-webkit-border-radius: 0;
border-radius: 0;
color: #3b3b3b;
font-family: inherit;
font-size: inherit;
text-decoration: none;
display: inline-block;
white-space: nowrap;
margin: 0;
padding: 0.2em 0.4em;
width: 100%;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
border-width: 1px;
border-style: solid;
border-color: #d4d4d4;
background: #fff;
}
textarea {
height: 8em;
vertical-align: top;
overflow: auto;
}
<textarea id="Textarea1" placeholder="Text area"></textarea>

最佳答案

删除第 14 行的 white-space: nowrap;

关于html - 输入/返回键不移动到文本区域中的新行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43989413/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com