max-lines

The max-lines CSS property specifies a region break is forced after its Nth descendant in-flow line box, where N is the specified value of max-lines.

Only lines boxes in the same Block Formatting Context are counted: the contents of descendants that establish independent formatting contexts are skipped over while counting line boxes.

Syntax

CSS

max-lines: value;

JS

object.style.maxLines = "value";

Values

<'max-lines'> = none | <integer>
none

The rendering is unaffected.

<integer>

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

Initial

none

Internal

block-ellipsis

continue

line-clamp

External

World Wide Web Consortium (W3C)

Home Menu