Home  >  Article  >  Web Front-end  >  css white-space:nowrap attribute usage (can force text to be output without wrapping)_CSS/HTML

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

WBOY
WBOYOriginal
2016-05-16 12:03:532458browse

To force no line breaks, just use white-space:nowrap.
CSS settings do not wrap:
overflow:hidden Hide
white-space: normal Default
pre Line breaks and other whitespace characters will be protected
nowrap Force all text to be displayed on the same line until The text ends or encounters the br object
Example: Force no line breaks

Copy code The code is as follows:

div{
white-space:nowrap;
}
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