skip navigation

Line Clamp

The CSS line-clamp property means the number of lines of an element can be truncated after the number specified.

.box {
    line-clamp: 5;
}

The above means only a maximum of 5 lines will be displayed.

Currently this is available in all modern browsers with the -webkit- prefix and a couple of other things:

.box {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
Aliqua sint dolore minim labore ad excepteur nulla. Qui cupidatat elit sint pariatur aliqua voluptate cupidatat cillum pariatur commodo do tempor. Eu commodo dolor reprehenderit elit. Nisi fugiat incididunt commodo excepteur mollit nostrud. Officia reprehenderit consequat est aliqua.