DEV Community

Sabrina Boby
Sabrina Boby

Posted on

show h2 in 2 line

Image description

h2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

Enter fullscreen mode Exit fullscreen mode

Top comments (0)