Home  >  Article  >  Web Front-end  >  拼网页div+css是文字补白速记_html/css_WEB-ITnose

拼网页div+css是文字补白速记_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:29:16852browse

1.想要how are you 中的空格有效:需加 word-spacing:20px;

2.固定div的宽度后,里面的文本是否想要溢出or隐藏: 需要设置 text-overflow:ellipsis;overflow:hidden;        text-overflow:ellipsis; overflow:visible;

3.文本中的空白是否有效:white-space:nowrap;//一行显示    white-space:pre;//遇到空白的换行才换行

4.根据词的属性换行 word-break:break-all;//是根据宽度而换行,不管这个词是否写完整立即换行。

5.这个换行和上面的差不多: word-wrap:break-word;

 

 

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn