Created
February 28, 2016 15:00
-
-
Save xiaoda/8e31f01ba3035ad108fe to your computer and use it in GitHub Desktop.
css实现强制不换行/自动换行/强制换行
This file contains 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; | |
} | |
/* 自动换行 */ | |
div{ | |
word-wrap: break-word; | |
word-break: normal; | |
} | |
/* 强制英文单词断行 */ | |
div{ | |
word-break:break-all; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment