记录下,这几天弄断词整的快疯了,FF的兼容性比较差,试了几种属性都不行,但是chrome都支持的很好
其中有
white-space:用init normal pre-line pre-wrap 效果相同,没有在单词处截断
我要处理的段落是这样的:
Storage System fan status change. The agent has detected a change in the Fan Status of a storage system. The variable cpqSsBoxFanStatus indicates the current fan status. User Action: If the fan status is degraded or failed, replace any failed fans.
使用后是这样
Storage System fan status change. The agent has detected a
change in the Fan Status of a storage system. The variable
cpqSsBoxFanStatus indicates the current fan status. User
Action: If the fan status is degraded or failed, replace any
failed fans.
text-overflow:ellipsis; 超出部分省略号显示(FF不支持)
word-wrap:break-word;这个就是长单词的截断,如果不截断,就超出长度,比如
我要处理的段落是这样的:
Storage System fan status change. The agent has detected a change in the Fan Status of a storage system. The variable cpqSsBoxFanStatus indicates the current fan status. User Action: If the fan status is degraded or failed, replace any failed fans.
使用后是这样
Storage System fan status change. The agent has detected a
change in the Fan Status of a storage system. The variable c
pqSsBoxFanStatus indicates the current fan status. User Acti
on: If the fan status is degraded or failed, replace any failed f
ans.
使用word-break后效果一样,和网上查到说法不太一样,先记录下回头研究研究中文情况