gpt4 book ai didi

html - 菜单下拉消失,链接被删除

转载 作者:行者123 更新时间:2023-11-28 12:59:18 26 4
gpt4 key购买 nike

我正在创建一个带有下拉菜单的自定义菜单,但是我遇到了一些错误。在我的 fiddle 中,它可以正常工作,但在网站上却没有。不过,我没有看到导致错误的原因。

这是网站:http://94co.com/client3/

这是我到目前为止的代码。

HTML:

<div id="nav_menu-12" class="et_pb_widget widget_nav_menu">
<div class="menu-logged-in-container">
<ul id="menu-logged-in" class="menu">
<li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-1483">
<a href="http://94co.com/client3/domaine-de-gourjo/">Domaine de Gourjo</a>
<ul class="sub-menu">
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1403"><a href="/client3/about/#the-castle">The Castle</a></li>
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1404"><a href="/client3/about/#the-vineyard">The Vineyard</a></li>
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1405"><a href="/client3/about/#a-family-history">A Family History</a></li>
</ul>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-1487"><a href="http://94co.com/client3/wines/">Our Wines</a>
<ul class="sub-menu">
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1498"><a href="/client3/wines/#domaine-gourjo-link">Domaines Wines</a></li>
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1497"><a href="/client3/wines/#gourjo-link">Gourjo</a></li>
</ul>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1401"><a href="http://94co.com/client3/store/">eCellar</a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1629"><a href="http://94co.com/client3/gorgeous-mag/">Gorgeous Mag</a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1402"><a href="http://94co.com/client3/contact-us/">Contact</a></li>
</ul>
</div>

CSS:

#menu-logged-in li ul { position: absolute; top: 30px; left: -27px; padding: 20px; }
#menu-logged-in li ul { z-index: 9999; width: 100% !important; padding-left: 10px !important; background: none; visibility: hidden; opacity: 0; -moz-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; }
#menu-logged-in li:hover > ul { opacity: 1; visibility: visible; }
#menu-logged-in li li { padding: 0;font-size:14px;margin-left: 20px; width:170px;}
#menu-logged-in li li ul { z-index: 1000; top: -3px; left: 220px; }
#menu-logged-in li:hover { visibility: inherit; /* fixes IE7 'sticky bug' */ }
.nav li li a, .et_mobile_menu li a { font-size: 14px; -moz-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; }
#menu-logged-in ul li a:hover { color: #ff0000; }
#menu-logged-in li a:hover { color: #ff0000; }
#menu-logged-in li.current-menu-item > a {
color: #b7b7b7 !important;
}

#menu-logged-in .menu-item-has-children > a:first-child:after {
content: ' ';
}

#menu-logged-in li {
display: inline-block;
font-size: 20px;
color:#a0a0a0;
position: relative;
padding: 0 35px 0 35px;
text-align: center;
}

这是 fiddle :http://jsfiddle.net/elitedesignstudios/wR7PN/

一如既往,任何帮助解决这个问题都会很棒。

最佳答案

我不知道它在做什么,但你有这个覆盖子菜单的 div。

HTML

<div class="et_pb_row">
<div class="et_pb_column et_pb_column_4_4">
<hr class="et_pb_space" style="height:150px;">
</div> <!-- .et_pb_column -->
</div>

CSS

.et_pb_row {
width: 1080px;
margin: 0 auto;
padding: 30px 0 0 0;
position: relative;
z-index: 2;
}

如果删除 z-index 菜单功能。

关于html - 菜单下拉消失,链接被删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21707666/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com