2016-05-30 92 views
0

我有一行。在行內,有一個名爲.col-md-6的類。 在列中,我有一段文字的段落標籤。 問題是,段落標記的內容超出了列的寬度。但我希望段落標記的內容在列中正確排列,如圖所示。 代碼:p標籤內容超出列寬

<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

回答

1

有這個CSS屬性。

p { 
    word-wrap: break-word; 
} 
+0

謝謝!有用!! –

1

CSS屬性:

p{ 
white-space: normal; 
word-wrap: break-word; 
}