如何使文本不溢出 bootstrap 中的框

How to make text not to overflow box in bootstrap

我正在使用 Bootstrap 3,并且我在 col 中有一个文本,当它更长时,它不适合 div 并且溢出到框的宽度。我使用了不同的显示样式,搜索了很多都没有成功。

<div class="container-fluid">
    <div class="row">
        <div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 col-lg-offset-1 col-md-offset-2">
          <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
              <div class="thumbnail">
                <img src="http://www.kungfunguyen.com/wp-content/uploads/2013/08/Bootstrap-2-1-Is-the-Latest-Update-to-Twitter-s-Popular-Open-Source-Project.png">
                <div class="caption">
                  Very long text which oveflows the whole div in width.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                </div>
              </div>
            </div>
        </div>
    </div>
</div>

带有缩略图和标题的示例,同样的问题 http://jsfiddle.net/zqeLse5q/

谢谢

.caption{
word-wrap: break-word;
}

http://jsfiddle.net/zqeLse5q/2/