我有一排。在行内,有一个名为.col-md-6的类。 在列中,我有一个带有一些文本的段落标记。 问题是,段落标记的内容超出了列宽。但我希望段落标记内容在列中正确对齐,如图所示。 代码:
<div class="row">
<div class="col-md-6 col-xs-12 col-sm-6">
<p>TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText</p>
</div>
</div>
答案 0 :(得分:1)
有一个CSS属性。
p {
word-wrap: break-word;
}
答案 1 :(得分:1)
CSS属性:
p{
white-space: normal;
word-wrap: break-word;
}