Multiline text overflow ellipsis (pseudo element + positioning) It is more suitable for mobile page, because mobile device browser is based on WebKit kernel General compatibility: – the WebKit line clamp attribute is only supported by WebKit kernel browsers Browser native implementation, so the ellipsis position display just right.text-overflow: ellipsis;( In the case of multiline text, use the ellipsis “…” to hide the overflow text).-webkit-box-orient: vertical;( And – WebKit line clamp: 2 Use in combination to set or retrieve the arrangement of child elements of a telescopic box object).display: -webkit-box;( And – WebKit line clamp: 2 Use it together to display the object as a flexible box model). To achieve this effect, it needs to combine other WebKit properties)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |