gpt4 book ai didi

html - 我需要将文本保留在容器中,而不需要一遍又一遍地使用
标记

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

我试图让我的文本留在我的框内而不超出它。我不想使用 <br>一遍又一遍地标记。所以我试图让它自动换行。

CSS

#NewsPosts {
position: relative;
bottom: 0px;
top: -925px;
font-size: 20px;
margin-left: 10;
margin-right: 10;
text-indent: 5;
}

HTML

<!--NewsPosts-->
<div id="NewsPosts">
<div align = "center">
<p>html text goes here</p>
</div>
</div>

这是一个例子:

http://puu.sh/cEWrV/ffe4b7e4cc.jpg

最佳答案

#NewsPosts p{
width:40%
word-break:break-all;
}

http://jsfiddle.net/91efphoL/1/

关于html - 我需要将文本保留在容器中,而不需要一遍又一遍地使用 <br> 标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26770009/

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