text 创世纪中的横向子菜单

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 创世纪中的横向子菜单相关的知识,希望对你有一定的参考价值。

@media only screen and (min-width: 1024px) {
    .genesis-nav-menu li a:hover {
        text-decoration: none;
    }

    .genesis-nav-menu > li:hover > a,
    .genesis-nav-menu > li > a:hover {
        color: #106ccc;
    }

    .genesis-nav-menu .sub-menu {
        right: 0;
        width: 100%;
        padding-left: calc(50vw - (1280px/2) ); /* where 1280px is the width of the wrap */
        border-top: none;
        background-color: #106ccc;
        font-size: 0.001px; /* to get rid of the horizontal gap between menu items */
    }

    .genesis-nav-menu .sub-menu a {
        border: none;
        color: #fff;
        background-color: transparent;
    }

    .genesis-nav-menu .sub-menu a:hover {
        background-color: #0c539d;
    }
}
https://sridharkatakam.com/horizontal-submenu-genesis/
https://sridharkatakam.com/accessing-parentancestor-menu-item-hovering-submenu-items-genesis/

We can set the .sub-menu to be 100% wide and anchored to the right so the submenu items appear full width with the first item in the submenu aligned at the left edge of the screen.

padding-left: calc(50vw - (1280px/2) )

where 1280px is the width of the wrap.

Menu Settings:
Display Location - After Header Menu

以上是关于text 创世纪中的横向子菜单的主要内容,如果未能解决你的问题,请参考以下文章

普通的横向下拉菜单

横向菜单效果

小demo--横向+展开菜单,支持m站

WPF 如何创建这样的横向菜单(Modern-UI)

text Wordpress - 在子菜单周围添加div包装器

子菜单下拉