Magento-2 Mobile menu setup
-
31-12-2020 - |
题
Yesterday, I was having an issue with horizontal top menu as I wanted to make them invisible on frontend. I made it invisible by using css as:
body.cms-my-homepage div.main-menu.menu-style-2{display:none}
And it worked for me but this code also disabled the mobile menu. Is there any other way, means by which I can enable the mobile menu or specify a new mobile menu?
解决方案
You can use following code in your CSS for displaying menu in your mobile device
@media only screen and (max-width: 767px) {
body.cms-my-homepage div.main-menu.menu-style-2{display:block}
}