Home  >  Article  >  Web Front-end  >  CSS 文本常用的换行方法_html/css_WEB-ITnose

CSS 文本常用的换行方法_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:10:45936browse

1、word-wrap:break-word;

内容将在边界内换行,仅用于块对象,内联对象要用的话,必须要设定height、width或display:block或position:absolute。

2、word-break:break-all;

用于处理单词折断。(注意与第一个属性的对比)

3、white-space:nowrap;用于处理元素内的空白,只在一行内显示。

4、overflow:hidden;

超出边界的部分隐藏。

5、text-overflow:ellipsis;

超出部分显示省略号。



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