我试图在我的网站上同时拥有顶部固定菜单和左侧垂直菜单。我真的希望两者都被修复,但是如果我开始滚动,那么左侧垂直菜单将在顶部菜单下方向上滑动,如下面的代码和 jsfiddle 所示:
<div class="ui inverted top fixed menu">
<div class="header item">
Top Menu Header
</div>
</div>
<div class="ui grid">
<div class="four wide column">
<div class="ui inverted left vertical fluid menu" id="side-menu">
<div class="item">
Item #1
</div>
<div class="item">
Item #2
</div>
</div>
</div>
<div class="twelve wide column">
<!-- Main content here -->
<div class="row">
Text here
</div>
<div class="row">
Text here
</div>
</div>
</div>
https://jsfiddle.net/318ruL3j/2/
如果我使用固定的垂直菜单,则第一项隐藏在顶部菜单下方,如下面的代码和 jsfiddle 所示:
<div class="ui inverted left vertical fixed menu" id="side-menu">
<div class="item">
Item #1
</div>
<div class="item">
Item #2
</div>
</div>
<div class="ui inverted top fixed menu">
<div class="header item">
Top Menu Header
</div>
</div>
<div class="ui grid">
<!-- Main content here -->
<div class="column">
<div class="row">
Text here
</div>
<div class="row">
Text here
</div>
</div>
</div>
https://jsfiddle.net/z5vozbts/2/
我希望我正在尝试做的事情是有意义的。有谁知道我如何才能拥有这两个固定菜单而不会重叠我的项目?