小白教程
所有教程
关于
Search
172.69.7.193
172.69.7.193
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Pr text white space”的源代码
本页内容
上一节:
Pr_pos_vertical_align
下一节:
Pr_text_word_spacing
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:white-space}}[[Category:css reference|189]] = CSS white-space 属性 = 规定段落中的文本不进行换行: <sample title="" desc="" lang="html" hererun="1"> p { white-space:nowrap; } </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> p { white-space:nowrap; } </style> </head> <body> <p> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </p> </body> </html> </run> == 属性定义及使用说明 == white-space属性指定元素内的空白怎样处理。 {| class="table table-striped table-hover" | 默认值: | normal |- | 继承: | yes |- | 版本: | CSS1 |- | JavaScript 语法: | object.style.whiteSpace="pre" |} == 浏览器支持 == 表格中的数字表示支持该属性的第一个浏览器版本号。 {| class="table table-striped table-hover" ! 属性 ! Chrome ! Internet Explorer / Edge ! Firefox ! Safari ! Opera |- | white-space | 1.0 | 5.5 | 3.5 | 3.0 | 9.5 |} == 属性值 == {| class="table table-striped table-hover" ! 值 ! 描述 |- | normal | 默认。空白会被浏览器忽略。 |- | pre | 空白会被浏览器保留。其行为方式类似 HTML 中的 <pre> 标签。 |- | nowrap | 文本不会换行,文本会在在同一行上继续,直到遇到 <br> 标签为止。 |- | pre-wrap | 保留空白符序列,但是正常地进行换行。 |- | pre-line | 合并空白符序列,但是保留换行符。 |- | inherit | 规定应该从父元素继承 white-space 属性的值。 |} == 相关文章 == CSS 教程: [[css text|CSS Text]]
返回至“
Pr text white space
”。
上一节:
Pr_pos_vertical_align
下一节:
Pr_text_word_spacing