gulp的实验库,有时间可以看看
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

79 lines
1.3 KiB

/**
* 工具类
**/
/**
* START============清除浮动=================START
**/
.clearfix() {
&:after {
clear: both;
content: ".";
display: block;
height: 0;
line-height: 0;
overflow: hidden;
}
*height: 1%;
}
.clearfix {
.clearfix();
}
/**
* OVER=============清除浮动==================OVER
**/
/**
* START============移动端头发丝=================START
**/
.hairline(@content) {
&::after {
content: " ";
box-sizing: border-box;
pointer-events: none;
border: 0 solid #ebedf0;
position: absolute;
top: -50%;
right: -50%;
bottom: -50%;
left: -50%;
-webkit-transform: scale(0.5);
transform: scale(0.5);
@content();
}
}
.hairline--all() {
.hairline({
border-width: 1px;
});
}
.hairline {
.hairline--all();
}
/**
* OVER=============移动端头发丝==================OVER
**/
/**
* START============文本溢出省略号=================START
**/
.ellipsis(@lines: 1) when (@lines = 1) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ellipsis {
.ellipsis();
}
.over-ellipsis {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
/**
* OVER=============文本溢出省略号==================OVER
**/