HTML 长文本换行


word-break 属性指定单词在到达行尾时应如何中断。


p.a {
    word-break: break-all;
}

word-break: normal|break-all|keep-all|break-word|initial|inherit;

属性值:

Value Description
normal 默认值。 使用默认换行符规则
break-all 按div容器长度进行换行
keep-all  Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as value "normal"
break-word To prevent overflow, word may be broken at arbitrary points
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM