Fullpage.js 在 mobile/below 给定像素上禁用?
Fullpage.js disable on mobile/below given pixels?
https://alvarotrigo.com/fullPage/
我试过这样的代码,但遗憾的是它不起作用。我想在 976px 之后为移动用户禁用它。
<script>
if (screen && screen.width > 768) {
document.write('<script type="text/javascript" src="http://your-file-path/fullpage.js"><\/script>');
}
</script>
只需使用 responsiveWidth
或 responsiveHeight
选项结合 fp-auto-height-responsive
。
在 the fullPage.js docs or see this codepen 中阅读有关所有这些选项的更多信息。
https://alvarotrigo.com/fullPage/
我试过这样的代码,但遗憾的是它不起作用。我想在 976px 之后为移动用户禁用它。
<script>
if (screen && screen.width > 768) {
document.write('<script type="text/javascript" src="http://your-file-path/fullpage.js"><\/script>');
}
</script>
只需使用 responsiveWidth
或 responsiveHeight
选项结合 fp-auto-height-responsive
。
在 the fullPage.js docs or see this codepen 中阅读有关所有这些选项的更多信息。