当前位置: 代码迷 >> HTML/CSS >> CSS器皿内容超出(溢出)自动换行代码
  详细解决方案

CSS器皿内容超出(溢出)自动换行代码

热度:773   发布时间:2012-10-07 17:28:51.0
CSS容器内容超出(溢出)自动换行代码
<style>

    .linebr {
        border:solid 1px red;
        clear: both; /* 清除左右浮动 */
        width: 100px; /* 必须定义宽度 */
        word-break: break-word; /* 文本行的任意字内断开 */
        word-wrap: break-word; /* IE */
        white-space: -moz-pre-wrap; /* Mozilla */
        white-space: -hp-pre-wrap; /* HP printers */
        white-space: -o-pre-wrap; /* Opera 7 */
        white-space: -pre-wrap; /* Opera 4-6 */
        white-space: pre; /* CSS2 */
        white-space: pre-wrap; /* CSS 2.1 */
        white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
        font-size:12px;
    }
</style>



<div class="linebr">sssssssssssss</div>

  相关解决方案