简体   繁体   中英

side effects of always using word-wrap: break-word

It seems like word-wrap: break-word (and its other browser specific versions) are commonly used for user generated comment that may run long. It seems to me that doing word-wrap: break-word on all the entire webpage would be a convenient and relatively easy safety net without having to specifying that everywhere. I did a quick sanity check and can't really think of how this may break things. Are there any side effects to watch out for before doing a * {word-wrap: break-word} ?

There shouldn't be any side-effects if your goal is to break long words and display them on the next line... This is what I mean:
abcdefghijklmnopqrstuvwxyz

will become

abcde
fghij
klmno
pqrst
uvwxy
z

Or something like that depending on the width of your page, ie, the word breaks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM