CSS参考手册
文本 | Text
越线 | line-break
这是一种实验技术
由于该技术的规格不稳定,请查看各种浏览器的兼容性表格以供使用。另外请注意,随着规范的变化,实验技术的语法和行为在未来版本的浏览器中可能会发生变化。
line-break
CSS属性用于指定当与标点符号工作时如何(或是否)换行。
/* Keyword values */
line-break: auto;
line-break: loose;
line-break: normal;
line-break: strict;
/* Global values */
line-break: inherit;
line-break: initial;
line-break: unset;
Initial value |
auto |
---|---|
Applies to |
all elements |
Inherited |
no |
Media |
visual |
Computed value |
as specified |
Animation type |
discrete |
Canonical order |
the unique non-ambiguous order defined by the formal grammar |
句法
可能值
auto
——使用默认换行符规则分隔文本。
loose
——使用限制最少的换行符规则分隔文本。通常用于较短的行,如报纸。
normal
——使用最常见的换行符分割文本。
strict
——使用最严格的换行符规则分隔文本。
形式语法
auto | loose | normal | strict
规范
Specification |
Status |
Comment |
---|---|---|
CSS Text Module Level 3The definition of 'line-break' in that specification. |
Working Draft |
Initial definition |
浏览器兼容性
Feature |
Chrome |
Edge |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari |
---|---|---|---|---|---|---|
Basic support |
1 -webkit 58 (unprefixed) |
(Yes) |
No support1 |
5.52 |
(Yes) -webkit 45 (unprefixed) |
(Yes) |
Feature |
Android Webview |
Chrome for Android |
Edge |
Firefox Mobile (Gecko) |
IE Mobile |
Opera Mobile |
Safari Mobile |
---|---|---|---|---|---|---|---|
Basic support |
(Yes) -webkit 58 (unprefixed) |
18 -webkit 58 (unprefixed) |
(Yes) |
No support1 |
? |
(Yes) -webkit 45 (unprefixed) |
(Yes) |
文本 | Text相关
层叠样式表( Cascading Style Sheets )是一种用来表现 HTML 或 XML 等文件样式的计算机语言。CSS 不仅可以静态地修饰网页,还可以配合各种脚本语言动态地对网页各元素进行格式化。