我想创建一个全宽下拉式超级菜单,我还可以在顶部栏中与移动屏幕中的向下钻取菜单结合使用。我在Foundation上尝试过的任何方法都只适用于Foundation 5,因为他们改变了Foundation 6中的顶部栏。
到目前为止,(在此主题的帮助下:http://foundation.zurb.com/forum/posts/36800-f6-and-mega-menus)我已经能够创建下拉菜单,在小屏幕上,标题栏出现并切换打开。但是,当我尝试打开带有向下钻取子菜单的项目时,它仍然会将其视为下拉项目。
另外,我注意到子菜单的全宽度悬停以某种方式将屏幕水平推向了很多额外的空白区域。虽然我可以通过向下拉窗格类添加最大宽度:100%来消除额外的空水平空间,但是当我将鼠标悬停在它们上面时,我的两个超级子菜单中的第二个不能正确显示全宽。虽然在codepen中,它们显示得很好。
这是codepen的链接:http://codepen.io/jen188/pen/PzRkbg
这是我标题的代码;
<header>
<div class="row columns expanded">
<a href="index.html"><img src="img/REPLogo.png" alt="Real Estate Promo" class="logo show-for-small-only" /></a>
<div class="title-bar" data-responsive-toggle="main-menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle></button>
<div class="title-bar-title">Menu</div>
</div>
<div class="top-bar" id="main-menu">
<div class="top-bar-left"><a href="index.html"><img src="img/REPLogo.png" alt="Real Estate Promo" class="logo hide-for-small-only" /></div>
<div class="top-bar-right">
<ul class="vertical medium-horizontal expanded dropdown menu" data-responsive-menu="drilldown medium-dropdown">
<li><a href="#">About Us</a></li>
<li><a href="#">Events Calendar</a></li>
<li class="has-submenu is-drilldown-submenu-parent">
<a href="#" class="dropdown" data-toggle="megamenu-resources">Resources
<div class="dropdown-pane" id="megamenu-resources" data-dropdown data-options="closeOnClick:true; hover: true; hoverPane: true">
<div class="row column expanded">
<div class="large-9 columns">
<div class="row column expanded">
<div class="large-4 columns">
<ul>
<li><a href="#"><h3>Foreclosure Laws</h3></a></li>
<li><a href="#"><img src="img/laws.png" alt="Click for More Info" /></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="large-4 columns">
<ul>
<li><a href="lenders.html"><h3>Hard Money Lenders</h3></a></li>
<li><a href="#"><img src="img/coin-stack.png" alt="Click for More Info" /></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="large-4 columns">
<ul>
<li><a href="glossary.html"><h3>Real Estate Glossary</h3></a></li>
<li><a href="#"><img src="http://placehold.it/500x250" alt="Click for More Info" /></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
</div>
</div>
<div class="large-3 columns">
<ul>
<li><a href="#"><h3>Find a REIA</h3></a></li>
<li><a href="#"><img src="img/map-icon.png" alt="Click for More Info"/></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<!-- <div class="small-12 large-3 columns">
<ul>
<li><a href="#">Find a REIA</a></li>
<li><a href="#"><img src="http://placehold.it/500x250" alt="Click for More Info"/></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div> -->
<!-- <div class="small-12 large-3 columns">
</div>
<div class="small-12 large-3 columns">
<ul>
<li><a href="lenders.html">Hard Money Lenders</a></li>
<li><a href="#"><img src="http://placehold.it/500x250" alt="Click for More Info"/></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="small-12 large-3 columns">
<ul>
<li><a href="glossary.html">Real Estate Glossary</a></li>
<li><a href="#"><img src="http://placehold.it/500x250" alt="Click for More Info"/></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div> -->
</div>
</div>
</a>
</li>
<li class="has-submenu is-drilldown-submenu-parent">
<a href="#" class="dropdown" data-toggle="megamenu-property-listings">Property Listings
<div class="dropdown-pane" id="megamenu-property-listings" data-dropdown data-options="closeOnClick:true; hover: true; hoverPane: true">
<div class="row column expanded">
<div class="small-12 large-3 columns">
<ul>
<li><a href="#">All Properties</a></li>
<li><a href="#"><img src="http://placehold.it/1000x250" alt="Click for More Info" /></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="small-12 large-4 columns">
<ul>
<li><a href="#">Single Family Properties</a></li>
<li><a href="#"><img src="http://placehold.it/1000x250" alt="Click for More Info" /></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="small-12 large-4 columns">
<ul>
<li><a href="#">Multi Family Properties</a></li>
<li><a href="#"><img src="http://placehold.it/1000x250" alt="Click for More Info" /></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
</div>
</div>
</a>
</li>
<li class="has-submenu is-drilldown-submenu-parent">
<a href="#" class="dropdown" data-toggle="megamenu-websites">Get a Website
<div class="dropdown-pane" id="megamenu-websites" data-dropdown data-options="closeOnClick:true; hover: true; hoverPane: true">
<div class="row column expanded">
<div class="small-12 large-6 columns">
<ul>
<li><a href="#">Get Started</a></li>
<li><a href="#"><img src="http://placehold.it/1000x250" alt="Click for More Info" /></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="small-12 large-6 columns">
<ul>
<li><a href="#">Features</a></li>
<li><a href="#"><img src="http://placehold.it/1000x250" alt="Click for More Info" /></a></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
</div>
</div>
</a>
</li>
<li><a href="#">Reviews</a></li>
<li><a href="#">Sign In</a></li>
</ul>
</div>
</div>
</div>
</header>
答案 0 :(得分:-1)
只需删除width:100%
和max-width:100%
,
而是使用width:auto
和left:0px !important
,所有工作都可以。