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)

高洛峰
高洛峰Original
2016-12-24 15:57:322381browse

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;
}


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!


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