在我的foundation_and_overrides.scss
中,我已将topbar-breakpoint
更改为特定的px
宽度。当宽度小于断点时,我想显示汉堡包图标。
现在它删除菜单并将其留空,直到我点击$small-range
。我不确定在foundation_and_overrides.scss
内编辑的位置,以便在遇到新断点时显示汉堡包图标/菜单。
SCSS
$topbar-breakpoint: 1225px; // Change to 9999px for always mobile layout
$topbar-media-query: "only screen and (min-width: #{$topbar-breakpoint})" !default;
HTML
<div class="fixed header" style="border-bottom: 1px solid #000;">
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1><a href="/"><img src="/assets/logo.png" alt="" id="logo-image"></a></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<section class="top-bar-section">
<ul class="left">
<li><a href='/programs'>Programs</li>
<li><a href='/projects'>Projects</li>
</ul>
</section>
</nav>
</div>