CSS: Can you prevent overflow: hidden from cutting-off the last line of text?

前端 未结 8 2124
余生分开走
余生分开走 2020-12-13 10:00

When using CSS overflow: hidden , I\'ve often found that the last line of text gets partially cut-off. Is there a way to prevent this so that any partial lines do not show

8条回答
  •  情深已故
    2020-12-13 10:50

    There are two css3 property exist. 1) word-break & 2) word-arap

    Don't forget these are new property that is css3. So that older browsers do not support such property.

    .class-name {word-break: break-all;}
    .class-name {word-wrap: break-word;}
    

提交回复
热议问题