line-clamp

The line-clamp CSS property is shorthand for max-lines, block-ellipsis, and continue.

Syntax

CSS

line-clamp: value;

JS

object.style.lineClamp = "value";

Values

<'line-clamp'> = none | <integer> <'block-ellipsis'>?
none

Sets max-lines to none, continue to auto, and block-ellipsis to none.

<integer>

Specifies one or more decimal digits (0-9).

<'block-ellipsis'> = none | auto | <string>
none

The rendering is unaffected.

auto

Render an ellipsis character (U+2026) or a more typographically-appropriate equivalent.

<string>

Specifies a sequence of characters delimited by double quotes (") or single quotes (').

Initial

none

Examples

integer

JS

Internal

block-ellipsis

continue

max-lines

External

World Wide Web Consortium (W3C)

Home Menu