常用mixin
作者:互联网
修复浮动导致的高度坍塌问题
@mixin clearfix {
&:after {
clear: both;
content: '.';
display: block;
height: 0;
line-height: 0;
overflow: hidden;
}
*height: 1%;
}
单行文本超长显示省略号
@mixin textOverflow($width:100%,$display:block) {
max-width: $width;
display: $display;
white-space: nowrap;
-ms-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
}
标签:常用,text,height,width,mixin,overflow,display 来源: https://blog.csdn.net/pzy_666/article/details/122860159