在上,当你将鼠标悬停在导航标题“服务”上时,会出现一个下拉列表。然后,当你将鼠标悬停在导航和鼠标标题“修复”上时,你会看到一个二级菜单出现。
我想将第二个黄色的子菜单向上移动,使其与其父菜单“修复”对齐。
现在,我可以通过将top: 0;和have top:-40px添加到ID property: nav li ul li ul来做到这一点。但是,将top:0和/或任何页边距添加到nav li ul li ul会导致二级黄色子导航始终显示,而不是仅在悬停时显示。
有什么建议吗?
所以我有一个导航菜单,可以在纵向或横向查看平板电脑时改变样式。它将最后几个菜单项折叠到另一个下拉菜单中。然而,菜单不会在方向更改时更新,只有在刷新后才会更新。
Jquery现代代码:
if(Modernizr.mq('(max-device-width: 800px) and (orientation: portrait)')){
// portrait stuff
// unhides last few menu items
$('#menu-primary-items > li:nth-last-child(-n+3)&
我目前有一个基于站点菜单输出二级导航的脚本,但是我想不出任何方法将帖子链接到页面,这样帖子仍然可以显示二级导航,这是可能的吗?下面是我用来输出我的二级导航的当前代码:
<?php
$secondAncestor = count($post->ancestors) -1; //figure out what level of navigation we are on, subtract one because we don't want to consider the top-level
if($post->post_parent!=0) //if the page i