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.
32 lines
565 B
32 lines
565 B
/**
|
|
* 响应式 媒体查询类
|
|
**/
|
|
|
|
.choose(@type, @style) when (@type=xs){
|
|
@media (max-width: 768px){
|
|
@style();
|
|
}
|
|
}
|
|
.choose(@type, @style) when (@type=sm){
|
|
@media (max-width: 920px){
|
|
@style();
|
|
}
|
|
}
|
|
.choose(@type, @style) when (@type=md){
|
|
@media (max-width: 1200px){
|
|
@style();
|
|
}
|
|
}
|
|
.choose(@type, @style) when (@type=lg){
|
|
@media (max-width: 1366px){
|
|
@style();
|
|
}
|
|
}
|
|
.loop(@i,@style,@list) when (@i<length(@list)){
|
|
.choose(extract(@list,@i+1),@style);
|
|
.loop(@i+1,@style,@list);
|
|
}
|
|
|
|
.media(@style,@rest...){
|
|
.loop(0,@style,@rest);
|
|
}
|
|
|