-
-
Save naoyeye/d926a81a80d997fe64377a01af47b53e to your computer and use it in GitHub Desktop.
连续字符换行/不换行
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*强制不换行*/ | |
div { | |
white-space: nowrap; | |
word-wrap: normal; | |
} | |
/*自动换行*/ | |
div { | |
word-wrap: break-word; | |
word-break: normal; | |
} | |
/*强制英文单词断行*/ | |
div { | |
word-break: break-all; | |
} | |
/*溢出省略号*/ | |
div { | |
white-space: nowrap; | |
text-overflow: ellipsis; | |
overflow: hidden; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment