Scrolling fixed header not showing on mobile device

后端 未结 1 1270
Happy的楠姐
Happy的楠姐 2021-01-24 19:05

I have a fixed header that changes to a sticky header on scroll using JS.

The dropdown menu works when in mobile view showing on Google Dev Tools and Firefox Responsive

相关标签:
1条回答
  • 2021-01-24 19:30

    Does the dropdown not open on mobile devices?

    Your .sticky css class has overflow: hidden; which is keeping the dropdown hidden. If you put it there to avoid horizontal scrolling, use overflow-x: hidden; instead. Then it won't cut the dropdown off.

    Generally you want overflow-y set to scroll when you have a fixed element with a dropdown on mobile. In case the menu extends beyond the bottom of the screen.

    0 讨论(0)
提交回复
热议问题