Fullpage.js没有在任何浏览器滚动(浏览器,Firefox,边缘)

问题描述 投票:0回答:1

我一直试图让使用fullpage.js一个非常简单的网站,但它只是不会滚动一整节像它应该。我已经包含在我的代码片段。该CSS / JS直接从fullpage.css和fullpage.js粘贴。我试过在不同的浏览器,在隐身窗口,禁用任何扩展或插件等..它只是不会。到目前为止,我已经想通了$(窗口).scroll事件将不会触发,所以并不会有$(“#全页”)。滚动

我的HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>

<link rel="stylesheet" type="text/css" href="fullpage.css" />
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256- 
BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"> 
</script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" 
integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" 
crossorigin="anonymous"></script>
<script type="text/javascript" src="fullpage.js"></script>
</head>

<body>

<div id="fullpage">
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
</div>

<script type="text/javascript">
$(document).ready(function() {
  $('#fullpage').fullpage({
  licenseKey: '',
  autoScrolling: true,
  sectionsColor: ['blue', 'yellow', 'green', 'red', 'brown']
  });

  $.fn.fullpage.setAllowScrolling(false);
});
</script>
</body>
</html>

codepen.io snippet

javascript html css fullpage.js
1个回答
0
投票

到目前为止,我已经想通了$(窗口).scroll事件将不会触发,所以并不会有$(“#全页”)。滚动

这是完全正常的。 Fullpage.js将不会触发滚动事件。

我会鼓励你采取任何the examples available作为起点的,如果你不能找到你失去了什么。

© www.soinside.com 2019 - 2024. All rights reserved.