如何創建一個全寬下拉菜單(超級菜單)的菜單? 我試圖建立這樣的菜單example 我試圖利用語義UI彈出窗口,但這隻適用於第一個菜單項(錯誤:「Popup不適合在視口的邊界內)」。 我會喜歡一個解決方案,而不是使用下拉菜單,但它們不使用屏幕的整個寬度。語義UI全寬菜單下拉菜單
$('#menu1')
.popup({
popup: '#menucontent1',
hoverable: true
});
$('#menu2')
.popup({
popup: '#menucontent2',
hoverable: true
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.js"></script>
<div class="ui secondary pointing menu">
<a class="browse item" id="menu1">
Item 1</a>
<a class="browse item" id="menu2">
Item 2</a>
</div>
<div class="ui fluid popup bottom left transition hidden" id="menucontent1">
<div class="ui four column relaxed equal height divided grid">
<div class="column">
<h4 class="ui header">Fabrics</h4>
<div class="ui link list">
<a class="item">Viscose</a>
</div>
<h4 class="ui header">Fabrics Level 2</h4>
<div class="ui link list">
<a class="item">Cashmere</a>
<a class="item">Linen</a>
<a class="item">Cotton</a>
</div>
</div>
<div class="column">
<h4 class="ui header">Size</h4>
<div class="ui link list">
<a class="item">Small</a>
<a class="item">Medium</a>
<a class="item">Large</a>
<a class="item">Plus Sizes</a>
</div>
</div>
<div class="column">
<h4 class="ui header">Colored</h4>
<div class="ui link list">
<a class="item">Neutrals</a>
<a class="item">Brights</a>
<a class="item">Pastels</a>
</div>
</div>
<div class="column">
<h4 class="ui header">Types</h4>
<div class="ui link list">
<a class="item">Knitwear</a>
<a class="item">Outerwear</a>
<a class="item">Pants</a>
<a class="item">Shoes</a>
</div>
</div>
</div>
</div>
<div class="ui fluid popup bottom left transition hidden" id="menucontent2">
<div class="ui four column relaxed equal height divided grid">
<div class="column">
<h4 class="ui header">Fabrics</h4>
</div>
<div class="column">
</div>
<div class="column">
</div>
<div class="column">
</div>
</div>
</div>
我的解決方案基於[jsfiddle](https://jsfiddle.net/L20w60h0/3/)基礎關於@MarouenMhiris的回答。 – user3333137