【问题标题】:How to implement Angular 2 fullpage.js scrolloverflow如何实现 Angular 2 fullpage.js 滚动溢出
【发布时间】:2017-07-17 06:26:25
【问题描述】:

我目前正在开发一个 Angular 2 项目,该项目实现了 https://github.com/meiblorn/ngx-fullpage 此处的 fullpage.js 端口。我正在尝试在我的一个部分上实现滚动溢出,但我不确定该怎么做。我在angular-cli.json 文件中包含了必要的 .js 文件。

"scripts": [
    "../node_modules/jquery/dist/jquery.js",
    "../node_modules/fullpage.js/dist/jquery.fullpage.min.js",
    "../node_modules/fullpage.js/dist/jquery.fullpage.extensions.min.js",
    "../node_modules/fullpage.js/vendors/scrolloverflow.min.js"
  ],

这是一些 html 代码,我希望第二部分在内容足够多时可以滚动。

<div mnFullpage>
  <div class="section welcome-section fp-section fp-table">
    <div class="fp-tableCell">
      1
    </div>
  </div>
  <div class="section welcome-section fp-section fp-table">
    <div class="fp-tableCell">
      2
    </div>
  </div>
</div>

【问题讨论】:

  • 你需要查看demo。它是如何在这里工作的github.com/meiblorn/ngx-fullpage/tree/master/sources/demo
  • 感谢您的链接,我现在在演示中实现了它。但是,你会不会碰巧知道如何更新页面上的滚动溢出?目前,当它加载时,它没有足够的内容来浏览页面,但是在它向后端 api 服务器发送一些 GET 请求之后,它确实有很多页面内容,但滚动没有更新

标签: html angular fullpage.js


【解决方案1】:

您现在可以更改为 fullPage.js 的官方 Angular 组件,该组件得到维护并始终与新的 fullPage.js 功能和扩展保持同步。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-01
    相关资源
    最近更新 更多