简体   繁体   中英

Off-Canvas Scrolling Separately from Page

So I've run into probably a very simple issue to fix as I've seen it done on so many mobile sites with their navigation. On my mobile site I am using the Foundation Off-Canvas "plug in" that they offer to handle my navigation. However, I've run into the issue that when I open it and start to scroll through the navigation, the page that the off-canvas is laying on top of also starts scrolling. Is there a prevent default action I can place on the content to prevent the page behind the Off-Canvas navigation from scrolling along with the navigation?

As far as code goes, everything is straight from foundation. I haven't manipulated much other than how the navigation looks in the styles. Functionality is still all the same. And it's coming from the left side of the page if that helps at all.

I don't know if this helps, but try to search for

posistion: fixed;

in the navigation's css file and change it to

posistion: absolute;

or

posistion: relative;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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