问题
https://alvarotrigo.com/fullPage/
I've tried code like this but that doesn't work sadly. I want to disable it after 976px for mobile users.
<script>
if (screen && screen.width > 768) {
document.write('<script type="text/javascript" src="http://your-file-path/fullpage.js"><\/script>');
}
</script>
回答1:
Just use the responsiveWidth
or responsiveHeight
option combined with fp-auto-height-responsive
.
Read more about all of those options in the fullPage.js docs or see this codepen.
来源:https://stackoverflow.com/questions/46868397/fullpage-js-disable-on-mobile-below-given-pixels