Home > Web Front-end > CSS Tutorial > css white-space:nowrap attribute usage (can force text to be output without wrapping)

css white-space:nowrap attribute usage (can force text to be output without wrapping)

高洛峰
Release: 2016-12-24 15:57:32
Original
2352 people have browsed it

To force no line breaks, just use white-space:nowrap.
CSS settings do not wrap:
overflow:hidden hides
white-space: normal Default
pre line breaks and other whitespace characters will be protected
nowrap forces all text to be displayed in the same line until the end of the text or encounters a br object
Example: force No line breaks

div{
white-space:nowrap;
}
Copy after login


For more usage of css white-space:nowrap attribute (you can force text to be output without line breaks), please pay attention to the PHP Chinese website for related articles!


Related labels:
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