在 Zurb Foundation 4 中,我在网格列中添加了以下内容。只需在您的基础全局变量和网格的@import 之后添加它。
@if $include-html-grid-classes != false {
/* Styles for screens that are atleast 768px and max width 1024px */
@media #{$small} and (max-width: 1024px) {
@for $i from 1 through $total-columns {
.medium#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
}
@for $i from 0 through $total-columns - 1 {
.row .medium-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
}
@for $i from 1 through $total-columns - 1 {
.push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
.pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
}
.column.medium-centered,
.columns.medium-centered { @include grid-column($center:true, $collapse:null, $float:false); }
.column.medium-uncentered,
.columns.medium-uncentered {
margin-#{$default-float}: 0;
margin-#{$opposite-direction}: 0;
float: $default-float !important;
}
.column.medium-uncentered.opposite,
.columns.medium-uncentered.opposite {
float: $opposite-direction !important;
}
}
}
现在您可以像使用小型和大型网格一样使用介质。
https://gist.github.com/poeticninja/5985220