Home > Web Front-end > HTML Tutorial > The difference between word-wrap, white-space and word break_html/css_WEB-ITnose

The difference between word-wrap, white-space and word break_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:44:12
Original
1207 people have browsed it

1. word-wrap:break-word;

The content will wrap within the boundary. It is only used for block objects. If you want to use it for inline objects, you must set height, width or display:block or position:absolute.

2. word-break:break-all;

is used to handle word breaks. (Note the comparison with the first attribute), the entire word will be removed

3. white-space:nowrap;

is used to process the white space within the element , only displayed in one line.

4. text-overflow:ellipsis;

The excess part displays ellipses.

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template