简体   繁体   English

带有Mega下拉菜单的两条水平线

[英]Two horizontal lines with Mega Drop Down Menu

I'm using well known Mega Drop Down Menu plugin from here . 从这里使用著名的Mega Drop Down Menu插件。 It is working fine but not if you want to make two lines of menu. 它工作正常,但如果要制作两行菜单,则不能。 I create an example here : jsFiddle There is a problem on second line menu is too height when you hover on it. 我在这里创建一个示例: jsFiddle当您将鼠标悬停在第二行菜单上时,它的高度太高了。 Thank you for help. 谢谢你的帮助。

I am not positive if this menu was designed to be used in this manner but you could do something like: 如果此菜单旨在以这种方式使用,我并不满意,但是您可以执行以下操作:

$('#mega-menu-1').dcMegaMenu({
    rowItems: '3',
    speed: 0,
    effect: 'slide',
    event: 'hover',
    fullWidth: true,
    beforeOpen: function() {
        $(this).find(".mega").css("top", 40 + $(this).offset().top-$(this).parent().offset().top);
    }
});

Basically to change the menu top beforeOpen depending on the offset of the menu item selected. 基本上改变菜单顶部beforeOpen根据所选择的菜单项的偏移。

http://jsfiddle.net/r0m4n/HJGFW/10/ http://jsfiddle.net/r0m4n/HJGFW/10/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM