【问题标题】:Hamburger menu not working after click on the sub menu单击子菜单后汉堡菜单不起作用
【发布时间】:2017-11-09 03:09:44
【问题描述】:

希望你喜欢:) 我需要一点帮助

我的网站运行良好,但在子菜单页面上,汉堡菜单根本没有显示。它在所有其他页面上显示完全正常,但在每个子菜单页面上都消失了..

http://packsmartinc.com/market-segment/specialty-print-finishing-solutions/ (这是我的子菜单页面之一)

请查看我的案例并告诉我。

谢谢, 奥马尔

【问题讨论】:

  • 我们可以查看您的代码以便我们解决这个问题吗?
  • 嘿,丹尼,这是一个 WordPress 网站,我如何将代码发送给您?请给我您的电子邮件,以便我可以向您发送我的测试管理员凭据。
  • @DannyV 我的一位朋友告诉我,这就是您的页面引发错误的原因。检查您是否从中理解了什么。
  • jQuery.Deferred 异常:无法读取未定义类型错误的属性“选择”:无法读取 HTMLDocument 中未定义的属性“选择”。 (packsmartinc.com/wp-content/themes/packsmartinc/js/…) 在 l (packsmartinc.com/wp-content/themes/packsmartinc/js/…) 在m (packsmartinc.com/wp-content/themes/packsmartinc/js/…) 未定义 fbevents.js:24 Facebook 像素错误:错误:重复像素 ID:249398855589158
  • 在stackoverflow中粘贴代码

标签: jquery html css hamburger-menu


【解决方案1】:
/* Responsive Menu */
.menu-other-style .menu-item:not(.current-menu-item) {
    display: none;
}
.menu-other-style .current-menu-item {
    width: 100%;
    height: auto;
    position: relative;
}
.menu-other-style .current-menu-item::before {
    display: inline-block;
    font-family: FontAwesome;
    font-feature-settings: normal;
    font-kerning: auto;
    font-language-override: normal;
    font-size: inherit;
    font-size-adjust: none;
    font-stretch: normal;
    font-style: normal;
    font-synthesis: weight style;
    font-variant: normal;
    font-weight: normal;
    line-height: 1;
    text-rendering: auto;
    color: #fff;
    font-size: 30px;
    position: absolute;
    right: 30px;
    top: 30%;
}
.menu-other-style .current-menu-item::before {
    content: "\f054";
}     
.menu-other-style .current-menu-item.open::before {
    content: "\f078";
}

.menu-other-style .current-menu-item a {
    padding: 20px;
}
.menu-other-style .current-menu-item a br {
    display: none;
}

.mobi-submenu-two {
    margin-top: 0;
    display: none;
}
.mobi-submenu-two .menu-item {
    display: block;
    width: 100%;
}
.mobi-submenu-two .menu-item a {
    border-bottom: 1px solid;
    display: block;
    font-size: 18px;
    padding: 10px 30px;
}
@media (max-width: 1350px) {

}


---------------------------------------  

.navi--top > li {
  margin-top: 0 !important;
}
.navi--top > li > a {
  height: 100%;
}
.navi--top > li.current-menu-item > a {
  background-color: #95050a;
}
.navi--top > li .sub-menu {
  background: #d31f26 none repeat scroll 0 0;
  margin: 0;
  padding: 15px 0 0;
  width: 350px;
  display: none;
  border-top: 1px solid #fff;
}
.navi--top > li .sub-menu li:hover .sub-menu,
.navi--top > li:hover > .sub-menu {
  display: block;
}
.navi--top > li .sub-menu li {
  margin: 0 !important;
}
.navi--top > li .sub-menu li a {
  color: #fff;
  padding: 5px 0 5px 20px;
  display: block;
}
.navi--top > li .sub-menu li a:hover {
  background-color: rgba(149, 5, 10, 0.7);
}
.sub-menu > li > .sub-menu {
  padding: 0 0 0 40px;
  border-top: 0;
  width: 450px;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-25
    • 2018-03-16
    • 2021-11-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多