首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

越线 | line-break

这是一种实验技术

由于该技术的规格不稳定,请查看各种浏览器的兼容性表格以供使用。另外请注意,随着规范的变化,实验技术的语法和行为在未来版本的浏览器中可能会发生变化。

line-breakCSS属性用于指定当与标点符号工作时如何(或是否)换行。

代码语言:javascript
复制
/* 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——使用最严格的换行符规则分隔文本。

形式语法

代码语言:javascript
复制
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)

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com