gpt4 book ai didi

html - 强制文本在浏览器中换行的方法,即使它是一个没有空格的连续字符串?

转载 作者:太空狗 更新时间:2023-10-29 13:43:16 24 4
gpt4 key购买 nike

If I have a string like "11111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110111111111011111111101111111110"

如何让我的页面中的这个字符串换行?在这里(stackoverflow)他们这样做了。

目前在我的页面上它只显示在一行上并向右流动?

最佳答案

使用word-wrap:break-word:

<pre style="word-wrap: break-word;">LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</pre>

或者:

<style type="text/css">
.wrapit{
word-wrap: break-word;
}
</style>
<div class="wrapit">LOOOOOOOOOOOOOOOONG</div>

关于html - 强制文本在浏览器中换行的方法,即使它是一个没有空格的连续字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3569367/

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