ฉันกำลังพยายามสร้างแถบปุ่มแบบกำหนดเองโดยจัดกึ่งกลางแถวโดยใช้ Foundation 5 mixins โดยที่ปุ่มมีความกว้างเท่ากันตามขนาดของปุ่มที่ใหญ่ที่สุดในกลุ่ม ในเวอร์ชันวานิลลา แค่เพิ่มเลขคู่ 4 ลงในคลาสก็สามารถทำได้ แต่ดูเหมือนว่าฉันจะไม่ได้รับไวยากรณ์ที่ถูกต้องสำหรับแถบปุ่มแบบกำหนดเอง
HTML
<div class="small-12 small-centered columns">
<ul class="top-nav">
<li><a href="/th#" class="topnavbtn">Instructions</a></li>
<li><a href="/th#" class="topnavbtn">Glossary</a></li>
<li><a href="/th#" class="topnavbtn">Documents</a></li>
<li><a href="/th#" class="topnavbtn">Links</a></li>
</ul>
</div>
ซีเอสเอส
.top-nav {
@include button-group-container(true, false);
text-align:center;
.topnavbtn {
$button-border-width: 1px;
$button-border-style: solid;
@include button($button-tny, #c0ced7, false, false, false, false);
}
& > li {
@include button-group-style(true, 4);
display:inline-block;
float:none;
}
}