Jquery 导航悬停不工作

Jquery 导航悬停不工作,jquery,html,css,Jquery,Html,Css,嗨,我正在尝试一种新的导航方式。但我似乎无法让悬停效应发挥作用。我以为我已经瞄准了它,但我就是不能让它工作。我现在只使用一个li,因为我只是在尝试。任何帮助都将不胜感激 我的代码 <body> <header class="page-header"> <nav class="main-nav" role="navigation" style="position: fixed; top: 0px; width: 100%; border-bottom

嗨,我正在尝试一种新的导航方式。但我似乎无法让悬停效应发挥作用。我以为我已经瞄准了它,但我就是不能让它工作。我现在只使用一个li,因为我只是在尝试。任何帮助都将不胜感激

我的代码

<body>

<header class="page-header">
        <nav class="main-nav" role="navigation" style="position: fixed; top: 0px; width: 100%; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(241, 241, 239);">

<div class="wrap">


   <div class="menu-category-menu-container"><ul id="menu-category-menu" class="category-nav"><li id="menu-item-13003" class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-has-children menu-item-13003"><a href="http://thefreshexchangeblog.com/category/lifestyle/">Lifestyle</a>
<ul class="sub-menu">
    <li id="menu-item-13153" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-13153"><a>On the Daily</a></li>
    <li id="menu-item-13149" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-13149"><a>Garden</a></li>
    <li id="menu-item-13154" class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-13154"><a>Our Home</a></li>
    <li id="menu-item-13022" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-13022"><a>Loving Now</a></li>
    <li id="menu-item-13155" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-13155"><a>Simple Evenings</a></li>
    <li id="menu-item-13150" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-13150"><a>Home Tours</a></li>
    <li id="menu-item-13147" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-13147"><a>Celebrations</a></li>
    <li id="menu-item-13146" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-13146"><a>Advice &amp; Tips</a></li>
</ul>
</li>

</ul></div>

</div>
        </nav>
      </header> 

    </body>


    • 如果我没有错,您是否尝试将子菜单悬停在右侧?如果正确,则必须将子菜单可见性设置为可见。选中此项:

      /**********naaaaaaaaaavvvv***************************************/
      .页眉.主导航.类别导航{
      浮动:左;
      左边距:-28px;
      }
      thefreshexchangeblog.com/media=“全部”
      ol,ul{
      列表样式:无;
      }
      thefreshexchangeblog.com/media=“全部”
      html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,缩写词,地址,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,dd,ol,ul,li,fieldset,form,label,label,table,table,table,table,caption,tbody,tfoot,thead,tr,th,th,th,the,the,the,the,of,旁白、画布、细节、嵌入、图形、figcaption、页脚、页眉、hgroup、菜单、导航、输出、红宝石、部分、摘要、时间、标记、音频、视频{
      保证金:0;
      填充:0;
      边界:0;
      字体大小:100%;
      字体:继承;
      垂直对齐:基线;
      }
      用户代理样式表ul,菜单,目录{
      显示:块;
      列表样式类型:disc;
      -之前的webkit保证金:1em;
      -webkit后的页边距:1em;
      -webkit保证金开始:0px;
      -webkit页边距结束:0px;
      -webkit填充开始:40px;
      }
      继承自
      thefreshexchangeblog.com/media=“全部”
      html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,缩写词,地址,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,dd,ol,ul,li,fieldset,form,label,label,table,table,table,table,caption,tbody,tfoot,thead,tr,th,th,th,the,the,the,the,of,旁白、画布、细节、嵌入、图形、figcaption、页脚、页眉、hgroup、菜单、导航、输出、红宝石、部分、摘要、时间、标记、音频、视频{
      保证金:0;
      填充:0;
      边界:0;
      字体大小:100%;
      字体:继承;
      垂直对齐:基线;
      }
      继承自
      thefreshexchangeblog.com/media=“全部”
      html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,缩写词,地址,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,dd,ol,ul,li,fieldset,form,label,label,table,table,table,table,caption,tbody,tfoot,thead,tr,th,th,th,the,the,the,the,of,旁白、画布、细节、嵌入、图形、figcaption、页脚、页眉、hgroup、菜单、导航、输出、红宝石、部分、摘要、时间、标记、音频、视频{
      保证金:0;
      填充:0;
      边界:0;
      字体大小:100%;
      字体:继承;
      垂直对齐:基线;
      }
      继承自
      thefreshexchangeblog.com/media=“全部”
      html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,缩写词,地址,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,dd,ol,ul,li,fieldset,form,label,label,table,table,table,table,caption,tbody,tfoot,thead,tr,th,th,th,the,the,the,the,of,旁白、画布、细节、嵌入、图形、figcaption、页脚、页眉、hgroup、菜单、导航、输出、红宝石、部分、摘要、时间、标记、音频、视频{
      保证金:0;
      填充:0;
      边界:0;
      字体大小:100%;
      字体:继承;
      垂直对齐:基线;
      }
      继承自
      thefreshexchangeblog.com/media=“全部”
      html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,缩写词,地址,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,dd,ol,ul,li,fieldset,form,label,label,table,table,table,table,caption,tbody,tfoot,thead,tr,th,th,th,the,the,the,the,of,旁白、画布、细节、嵌入、图形、figcaption、页脚、页眉、hgroup、菜单、导航、输出、红宝石、部分、摘要、时间、标记、音频、视频{
      保证金:0;
      填充:0;
      边界:0;
      字体大小:100%;
      字体:继承;
      垂直对齐:基线;
      }
      .页眉.主导航李{
      显示:内联块;
      位置:相对位置;
      }
      李{
      保证金:0;
      填充:0;
      边界:0;
      字体大小:100%;
      字体:继承;
      垂直对齐:基线;
      }
      李{
      显示:列表项;
      文本对齐:-webkit匹配父项;
      }
      .页眉.主导航李a{
      填充:0 28px;
      显示:块;
      字体:普通900 12px/48px“brandon grotesque”,Arial,无衬线;
      字母间距:1px;
      颜色:#000;
      文本转换:大写;
      文字装饰:无;
      }
      a{
      颜色:#ae9623;
      字体:斜体;
      文字装饰:无;
      -webkit转换:.2所有易入易出;
      过渡:.2s所有输入输出都很容易;
      }
      .页眉.主导航li ul{
      可见性:隐藏;
      宽度:200px;
      左边距:-100px;
      填充:14px0;
      位置:绝对位置;
      最高:100%;
      左:50%;
      z指数:2;
      不透明度:1;
      空白:nowrap;
      背景:#000;
      -webkit转换:.2所有易入易出;
      过渡:.2s所有输入输出都很容易;
      }
      ol-ul,ul-ol,ul-ul,ol-ol{
      -之前的webkit保证金:0px;
      -网络工具包后的保证金:0px;
      }
      菜单,目录{
      显示:块;
      列表样式类型:disc;
      -之前的webkit保证金:1em;
      -webkit后的页边距:1em;
      -webkit保证金开始:0px;
      -webkit页边距结束:0px;
      -webkit填充开始:40px;
      }
      .页眉.主导航li ul:之前{
      内容:“;
      宽度:0;
      身高:0;
      保证金:自动;
      显示:块;
      位置:绝对位置;
      顶部:-8px;
      左:0;
      右:0;
      左边框: