1. scss
@mixin rounded($param1,$param2) {
#{$param1}:$param2;
-webkit-#{$param1}: $param2;
-moz-#{$param1}: $param2;
-ms-#{$param1}: $param2;
-o-#{$param1}:$param2;
}
使用方法:
@include rounded(transition,all 0.3s);
2.less
.promise(@css, @args) {
@{css}: @args;
[email protected]{css}: @args;
[email protected]{css}: @args;
[email protected]{css}: @args;
[email protected]{css}: @args;
}
使用方法:
.promise(box-sizing, border-box);
3.css
/*多行文本溢出*/
.font_duo {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
/*单行文本溢出*/
.font_dan {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
原文地址:https://www.cnblogs.com/aoqizhonghua/p/10336663.html
时间: 2024-10-24 05:26:45