水平子菜单问题- GeneratePress主题

GeneratePress主题子菜单下拉菜单从垂直更改为水平

这个CSS作为你的水平子菜单:

.dropdown-hover .main-navigation:not(.toggled) ul li:hover>ul, 
.dropdown-hover .main-navigation:not(.toggled) ul li.sfHover>ul {
    max-height: 1000px;
    overflow: hidden;
    width: auto;
    background: #fff;
    transition-delay: 200ms;
}

.dropdown-hover .main-navigation:not(.toggled) ul li:hover, 
.dropdown-hover .main-navigation:not(.toggled) ul li.sfHover {
    position: static;
}

.main-navigation ul ul li {
    display: inline-block;
    width: auto;
}

.main-navigation .main-nav ul li a {
    position: relative;
}

可选:

body .sf-menu > li {
	position: static;
}

body .main-navigation ul.menu > li > ul {
	width: 100%;
        left: 0 !important;
}

body .main-navigation ul.menu > li > ul > li {
	width: auto;
}

body .main-navigation ul.menu > li > ul > li ul {
	left: 0;
	top: 100%;
}

 

 

声明:本站资源绿色无后门无广告,可放心下载。如无特殊说明或标注,均为本站原创发布,转载请注明出处!