Easy Tutorial
❮ Zookeeper Linux Cluster Android Develop Mvp ❯

CSS English and Chinese Forced Line Break and Non-Break Code

Category Programming Techniques

Note: Be sure to specify the width of the container (width), otherwise, it won't work.

Example

.p1{ word-break:break-all; width:150px;}
.p2{ word-wrap:break-word; width:150px;}
.p3{white-space:pre-wrap; width:150px;}
.p4{white-space:nowrap; width:10px;}
.p5{white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:100px;}

word-break Syntax

word-break : normal | break-all | keep-all

Parameters:

For more information, refer to CSS3 word-break property

❮ Zookeeper Linux Cluster Android Develop Mvp ❯