【问题标题】:How to make text not to overflow box in bootstrap如何在引导程序中使文本不溢出框
【发布时间】:2015-08-24 14:24:43
【问题描述】:

我正在使用 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/

谢谢

【问题讨论】:

    标签: css twitter-bootstrap text twitter-bootstrap-3 overflow


    【解决方案1】:
    .caption{
    word-wrap: break-word;
    }
    

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

    【讨论】:

    • 非常感谢你,我找不到这个 css 的东西。再次感谢。
    • 很高兴它成功了。如果它解决了您的问题,请接受答案,以免其他人也浪费时间尝试回答问题
    猜你喜欢
    • 1970-01-01
    • 2015-01-09
    • 2015-04-02
    • 2018-11-03
    • 2022-09-27
    • 2013-07-18
    • 2016-11-14
    • 1970-01-01
    • 2020-05-23
    相关资源
    最近更新 更多