是否可以指定要在其兄弟姐妹之前或之后呈现的重叠网格元素?
我下面的代码将.l-branding
呈现.l-header
. 我需要在源顺序.l-branding
之前.l-header
,所以它.l-header
在手机上呈现(幻灯片)。
HTML:
<div class="l-container">
<div class="l-branding">
<!-- logo -->
</div>
<div class="l-header">
<!-- image slider -->
</div><!-- end .l-header -->
<navigation class="l-navigation" role="navigation">
<!-- navigation -->
</navigation>
</div><!-- end .l-container -->
SCSS:我可以将position:absolute;
andz-index:10
用于$tab
&$desk
断点,但想知道是否有更好的方法。
///////////////////////////////////////////////////////////
//
// HEADER
//
///////////////////////////////////////////////////////////
.l-header-wrap {
@include clearfix;
}
.l-header {
@include grid-span(4,1);
@include breakpoint($tab) {
@include grid-span(12,1);
min-height:$vert-spacing-unit * 5;
}
@include breakpoint($desk) {
@include grid-span(18,1);
}
}
///////////////////////////////////////////////////////////
//// BRANDING
///////////////////////////////////////////////////////////
.l-branding {
@include grid-span(4,1);
@include breakpoint($tab) {
@include grid-span(11,1);
//position: absolute;
//top:1em;
}
@include breakpoint($desk) {
@include grid-span(17,1);
}
}
///////////////////////////////////////////////////////////
//// NAV
///////////////////////////////////////////////////////////
.l-navigation {
@include grid-span(4,1);
@include grid-background;
@include breakpoint($tab) {
@include grid-span(12,1);
//margin-top:-100px;
//position: absolute;
//bottom:0;
}
@include breakpoint($desk) {
@include grid-span(18,1);
//margin-top:-100px;
}
}