gpt4 book ai didi

javascript - 可编辑的 Div 不换行

转载 作者:太空宇宙 更新时间:2023-11-04 08:47:44 26 4
gpt4 key购买 nike

我的 div 没有像预期的那样使用react(可编辑)。它在键入时继续处理文本:

text overflows inside div

我需要让它自动换行,我不知道它是 css 部分还是 JS 部分,我尝试了我能在互联网上找到的所有 css 部分。Hare 是我的 div CSS:

height: 600px;
width: 1100px;
clear: left;
line-height: 14pt;
float:left;
overflow:hidden;

最佳答案

word-wrap:break-word;display:inline-block; 一起使用:

    #mydiv{
display:inline-block;
word-wrap:break-word;
height: 600px;
width: 300px;
clear: left;
line-height: 14pt;
float:left;
overflow:hidden;
}
<div id='mydiv'>   
Please,couldyoustopthenoiseI'mtryingtogetsomerestFromallthunbornchickenvoicesinmyheadWhenIamking,youwillbefirstagainstthewall
</div>

关于javascript - 可编辑的 Div 不换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43659788/

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