1/*CSS to limit the text length inside a div*/
2text-overflow: ellipsis;
3overflow: hidden;
4white-space: nowrap;
1.class{
2 word-break: break-word;
3 overflow: hidden;
4 text-overflow: ellipsis;
5 display: -webkit-box;
6 line-height: 16px; /* fallback */
7 max-height: 32px; /* fallback */
8 -webkit-line-clamp: 2; /* number of lines to show */
9 -webkit-box-orient: vertical;
10}
1body {
2 margin: 20px;
3}
4
5.text {
6 overflow: hidden;
7 text-overflow: ellipsis;
8 display: -webkit-box;
9 -webkit-line-clamp: 2; /* number of lines to show */
10 -webkit-box-orient: vertical;
11}
1p {
2 white-space: nowrap;
3 overflow: hidden;
4 text-overflow: ellipsis;
5 max-width: 200px;
6}
7