【问题标题】:Reveal menu that opens on click显示单击时打开的菜单
【发布时间】:2016-06-27 05:50:03
【问题描述】:

您好,我目前正在处理位于here 的网页。这是一个 wordpress 网站,它使用一个名为 The7 的主题,该主题包括一种名为“点击导航”的菜单,它运行良好,但是我一直试图将左侧菜单的初始状态设置为 show-header的默认封闭标题,并且无法这样做。

我注意到最初检查网站的 html、body 和 id 为 #page 的 div 的类从:

<html class= "js no-touch cssanimations csstransforms csstransforms3d csstransitions cssfilters mobile-false not-iOS">
<body class="home page page-id-11 page-template-default logged-in small-hover-icons header-side-left sticky-header slide-header-animation header-side-line header-above-side-line srcset-enabled btn-flat custom-btn-color custom-btn-hover-color filter-style-minimal contact-form-minimal small-fancy-datas semitransparent-bullets bold-icons phantom-fade phantom-shadow-decoration phantom-main-logo-on floating-mobile-menu-icon first-switch-logo-left first-switch-menu-right second-switch-logo-left second-switch-menu-right layzr-loading-on wpb-js-composer js-comp-ver-4.9.2 vc_responsive outlined-portfolio-icons album-minuatures-style-2 is-webkit no-mobile esg-blurlistenerexists closed-overlay-mobile-header">
<div id="page" class="closed-mobile-header">

手动打开左侧菜单时如下。

<html class= "js no-touch cssanimations csstransforms csstransforms3d csstransitions cssfilters mobile-false not-iOS menu-open">
<body class="home page page-id-11 page-template-default logged-in small-hover-icons header-side-left sticky-header slide-header-animation header-side-line header-above-side-line srcset-enabled btn-flat custom-btn-color custom-btn-hover-color filter-style-minimal contact-form-minimal small-fancy-datas semitransparent-bullets bold-icons phantom-fade phantom-shadow-decoration phantom-main-logo-on floating-mobile-menu-icon first-switch-logo-left first-switch-menu-right second-switch-logo-left second-switch-menu-right layzr-loading-on wpb-js-composer js-comp-ver-4.9.2 vc_responsive outlined-portfolio-icons album-minuatures-style-2 is-webkit no-mobile esg-blurlistenerexists closed-overlay-mobile-header show-sticky-header">
<div id="page" class="closed-mobile-header show-header">

我已尝试了解是否可以更改网页的 CSS 或 JS 值,但不知道必须在哪里更改。 感谢您的帮助。

【问题讨论】:

    标签: javascript css wordpress menu header


    【解决方案1】:

    我没有主题,因此不确定它的结构。但是,您应该能够通过执行以下操作来做到这一点。

    1. class open-menu 添加到
    2. class show-sticky-header 添加到
    3. class show-header 添加到

      我会建议以下方法。

      1. 备份您的网站或至少备份所涉及的文件。
      2. 确保您正在使用子主题。
      3. 一次打开​​您的主题文件并查找主题呈现标签的位置。
      4. 将该文件复制到您的子主题中
      5. 在子主题中修改它/它们以添加三个类。

      如果我可以合法访问该主题,我绝对可以告诉你确切的位置。不幸的是,它是 59 美元。但是,即使您是 WP 和 PHP 的新手,像这样缓慢而周到、有条理的搜索至少可以让您至少找到它需要发生的确切位置。如果您仍然无法弄清楚,您可以在此处重新发布您主题的该部分,并且有人可以帮助提供详细信息。

      我只是不确定如果没有主题或至少有问题的代码,任何人可以提供多少帮助。

      希望对你有帮助,

      提姆

      附:如果您不熟悉,这里有关于儿童主题的信息。 https://codex.wordpress.org/Child_Themes

    【讨论】:

      猜你喜欢
      • 2015-06-03
      • 2019-03-05
      • 1970-01-01
      • 1970-01-01
      • 2018-12-26
      • 2018-09-29
      • 1970-01-01
      • 1970-01-01
      • 2023-03-23
      相关资源
      最近更新 更多