💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
[TOC] > [home](https://better-scroll.github.io/docs/zh-CN/guide/) ## 更好的滚动 的实现,它的 API 设计基本兼容 iscroll,在 iscroll 的基础上又扩展了一些 feature 以及做了一些性能优化。 ## 安装 ``` npm install better-scroll -S # install 2.x,with full-featured plugin. npm install @better-scroll/core # only CoreScroll ``` ## 示例 ``` <div class="wrapper"> <ul class="content"> <li>...</li> <li>...</li> ... </ul> <!-- 这里可以放一些其它的 DOM,但不会影响滚动 --> </div> ``` js ``` import BScroll from '@better-scroll/core' let wrapper = document.querySelector('.wrapper') let scroll = new BScroll(wrapper) ```