📜  CSS white-space

📅  最后修改于: 2020-11-06 01:01:12             🧑  作者: Mango

CSS white-space

CSS white-space属性用于指定如何显示元素中的内容。它用于处理元素内部的空白。

CSS空白值

有许多空白值可用于显示元素内的内容。

Value Description
normal This is a default value. in this value, text is wrapped when necessary. sequences of white space will collapse into a single whitespace.
nowrap Sequences of white space will collapse into a single whitespace. in this value, text will never wrap to the next line and only break when
tag is used.
pre Whitespace is preserved by the browser. it is act like html
 tag. text will only wrap on line breaks.
pre-line Sequences of white space will collapse into a single whitespace. texts are wrapped when necessary, and on line break.
pre-wrap Whitespace is preserved by the browser. texts are wrapped when necessary, and on line break.
initial It sets this property to its default value.
inherit It inherits this property from its parent element.

CSS空白示例







Write some text..Write some text..Write some text.. Write some text..Write some text..Write some text.. Write some text..Write some text..Write some text.. Write some text..Write some text..Write some text.. Write some text..Write some text..Write some text..