我使用的是Stellarnav移动友好型Dropdown插件,当浏览器窗格的宽度减小到断点设置以下时,响应部分起作用。当通过使用Toggle-Developer工具在chrome开发人员工具上启用了不同的移动设备时,相同的响应似乎不起作用。
jQuery('#main-nav').stellarNav({
// adds default color to nav. (light, dark)
theme : 'plain',
// number in pixels to determine when the nav should turn mobile friendly
breakpoint: 960,
// label for the mobile nav
// adds a click-to-call phone link to the top of menu - i.e.:
"18009084500"
phoneBtn: false,
// adds a location link to the top of menu - i.e.: "/location/",
"http://example.com/"
locationBtn: false,
// makes nav sticky on scroll
sticky : false,
// how fast the dropdown should open in milliseconds
openingSpeed: 250,
// controls how long the dropdowns stay open for in milliseconds
closingDelay: 250,
// 'static', 'top', 'left', 'right'
position: 'static',
// shows dropdown arrows next to the items that have sub menus
showArrows: true,
// adds a close button to the end of nav
closeBtn : false,
// fixes horizontal scrollbar issue on very long navs
scrollbarFix: false,
// enables mobile mode
mobileMode: false
});