我正在尝试使用 Susy Compass 框架将 2 个 div 向右浮动并遇到一个清除问题:
<div class="div-1">
<h2>DIV 1</h2>
</div><!--end div-1-->
<div class="div-2">
<h2>DIV2</h2>
</div><!--end div-2-->
<div class="div-3">
<h2>DIV 3</h2>
</div><!--end div-3-->
<div class="div-4">
<h2>DIV 4</h2>
</div><!--end div-4-->
<div class="div-5">
<h2>DIV 5</div>
</div><!--end div-5-->
这是我的 Susy 布局代码:
#detail{
.div-1{
@include breakpoint($breakpoint-md){
@include span-columns(7, 12);
@include pre(1);
background-color:pink;
}
}
.div-2{
@include breakpoint($breakpoint-md){
@include span-columns(7,12);
@include pre(1);
}
}
.div-3{
@include breakpoint($breakpoint-md){
@include span-columns(7,12);
@include pre(1);
}
}
.div-4{
@include breakpoint($breakpoint-md){
@include span-columns(3,12);
@include suffix(1);
//@include omega;
background-color:blue;
}
}
.div-5{
@include breakpoint($breakpoint-md){
@include span-columns(3,12);
@include post(1);
//@include omega;
background-color:orange;
}
}
}
为了举例说明这是如何渲染的,下面是一个屏幕截图:
如您所见,div-3
并div-5
没有清除到顶部,与div-1
.
我想也许我可以使用@alpha
mixin,但它在 Susy 1.0(我正在使用)中已被弃用。我也尝试过使用@omega
ondiv-3
并且div-5
没有任何变化。