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.
39 lines
805 B
39 lines
805 B
/**
|
|
* 响应式 媒体查询类
|
|
* 移动端优先
|
|
**/
|
|
@import (reference) "../var.less";
|
|
|
|
.choose2(@type, @style) when (@type=xs){
|
|
@media screen and (max-width: @sm - 0.1px){
|
|
@style();
|
|
}
|
|
}
|
|
.choose2(@type, @style) when (@type=sm){
|
|
@media screen and (max-width: @md - 0.1px){
|
|
@style();
|
|
}
|
|
}
|
|
.choose2(@type, @style) when (@type=md){
|
|
@media screen and (max-width: @lg - 0.1px) {
|
|
@style();
|
|
}
|
|
}
|
|
.choose2(@type, @style) when (@type=lg){
|
|
@media screen and (max-width: @xl - 0.1px) {
|
|
@style();
|
|
}
|
|
}
|
|
.choose2(@type, @style) when (@type=xl){
|
|
@media screen and (min-width: @xl - 0.1px) {
|
|
@style();
|
|
}
|
|
}
|
|
.loop2(@i,@style,@list) when (@i<length(@list)){
|
|
.choose2(extract(@list,@i+1),@style);
|
|
.loop2(@i+1,@style,@list);
|
|
}
|
|
|
|
.media_m(@style,@rest...){
|
|
.loop2(0,@style,@rest);
|
|
}
|
|
|