gpt4 book ai didi

html - p标签内容超出列宽

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

我有一个排。在行内,有一个名为 .col-md-6 的类。在列内,我有一个带有一些文本的段落标记。问题是,段落标签的内容超出了列宽。但我希望段落标签内容在列中正确对齐,如图所示。代码:

<div class="row">
<div class="col-md-6 col-xs-12 col-sm-6">
<p>TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText</p>
</div>
</div>

链接: http://jsbin.com/zimuwonoyu/edit?html,output

我希望它像图片中显示的那样: enter image description here

最佳答案

有一个 CSS 属性。

p {
word-wrap: break-word;
}

关于html - p标签内容超出列宽,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37519210/

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