0

大家好,我对使用 javascript 非常陌生,我无法让这个 jquery.fullpage.js 滚动功能工作,https://github.com/alvarotrigo/fullPage.js#fullpagejs ,我不知道我应该如何安装它。

我的代码:

<html>
   <head>
     <link href="/mysite/css/jquery.fullPage.css" rel="stylesheet">
     <script src="/mysite/js/jquery.fullPage.js">
   </head>
   <body>
     <div class="section active">
       MYCONTENT
     </div>
     <div class="section">
       MYCONTENT
     </div>
   </body>
 </html>
4

1 回答 1

1

我已经用这个做了几个小时,而且很容易

这是我的 joomla 模板!(例子)

 <head>
 //here you put the code that gets the source files for fullpage.js  which you find on the github link//
 </head>

 <body>
 //here is your body and it probably have tons of <div> elements in it, in different levels like this:
 <div>
    <div>
      <div>
     //here you can for example find a line of php that renders a module.
     </div>
    </div>
 </div>

当我尝试在我的 joomla 网站上实现 fullpage.js 时,我做错的事情是,我将部分类放在body 标记之后不在第 2 级的 div 中

我想解释的是:

 <body>
 <div id="fullpag <<-this is where fullpage starts">
    <div class="section" >
    YOUR CONTENT
    </div>
 </div>

id为fullpage的div应该总是从第一层开始,section总是在body标签之后的第二层,我没有真正的名字,我称之为levels,但我希望每个人都能理解。

于 2014-06-05T08:10:34.193 回答