gpt4 book ai didi

html - 在文本区域中强制换行

转载 作者:行者123 更新时间:2023-12-05 07:41:41 26 4
gpt4 key购买 nike

我对 textarea angular 标签有疑问,它在 ie11 和 firefox/chrome 中的工作方式不同。当我在 chrome/firefox 中键入长文本时,它会自动将文本放入 textarea 中,就像这样:

Chrome example

但是当我在 ie11 上输入相同的文本时,它看起来像这样:

IE example

是否可以让 ie 像 chrome/firefox 一样工作?

textarea 的样式如下:

width: 380px;
height: 202px;
resize: none;
border: 1px solid #e1e1e1;
border-radius: 2px;

提前致谢

最佳答案

正如@SáT 指出的那样,解决方案就在那个问题中(我一直在社区中寻找,但没有找到那个问题)。

解决方法是添加white-space:pre-wrap

关于html - 在文本区域中强制换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45213885/

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