Last active
January 8, 2022 08:27
-
-
Save bigshans/d6e480820d7ca52e80a5370bef42d38b to your computer and use it in GitHub Desktop.
Some css trcicks code record.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 当文本内容长度超过容器最大宽度时,自动省略多余的文本。 */ | |
/* When the text content length exceeds the maximum container width, | |
* the excess text is automatically omitted. */ | |
.line-clamp(@line) { | |
display: -webkit-box; | |
-webkit-line-clamp: @line; | |
-webkit-box-orient: vertical; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
overflow-wrap: break-word; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment