@@ -3,3 +3,18 @@
overflow: hidden;
text-overflow: ellipsis;
}
+// 单行超长省略号
+@mixin oneline-ellipsis($width: 100%) {
+ width: $width;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+// 多行超长省略号
+@mixin moreline-ellipsis($line: 2, $width: 100%) {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: $line;
+ word-break: break-all;