感谢您的回答...我现在会尝试更好地为您发布代码。可惜不能用jsfiddle或者code pen举个例子——可惜这些代码片段网站只接受css,不接受scss和susy!!!
好的...
HTML 是 -
<div class="nav">
<ul>
<li><a class="button active" href="#home">Home</a></li>
<li><a class="button" href="palms-for-sale.html">Shop</a></li>
<li><a class="button" href="ordering.html">Ordering</a></li>
<li><a class="button" href="delivery.html">Delivery</a></li>
<li><a class="button" href="plant-care.html">Care</a></li>
<li><a class="button" href="about.html">About</a></li>
</ul>
</div>
scss是 -
.nav {
@include susy-breakpoint($xmedium-bp, $medium) {
@include span(8 of 8 at 0);
@include margin-leader(1);
height: 30px;
line-height: 30px;
vertical-align: middle;
ul {
li {
display: inline;
}
}
}
@include susy-breakpoint($large-bp, $large) {
@include span(8 of 8 at 0);
}
ul {
li {
a {
&.button {
@include susy-breakpoint($xmedium-bp, $medium) {
@include with-layout(6 inside, true){
@include span(1);
&::before {
content: " | ";
}
&:first-child {
&::before {
content: "";
}
}
}
}
@include susy-breakpoint($large-bp, $large) {
@include with-layout(6 inside, true){
@include span(1);
}
}
}
}
}
}
}
我希望我已经为您剥离了足够多的示例。
非常感谢您的关注。
Vx