完美支持IE,Firefox,Opera等浏览器。

<style type="text/css">
.linebr {
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) */
}
</style>

<div class="linebr">CSS容器内容超出(溢出)自动换行,CSS容器内容超出(溢出)自动换行,CSS容器内容超出(溢出)自动换行</div

相关文章:

  • 2021-11-30
  • 2021-12-16
  • 2022-01-01
  • 2022-12-23
  • 2021-04-16
  • 2022-02-19
  • 2021-08-21
猜你喜欢
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
  • 2021-12-04
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案