您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
rpm-mcarman b9f7ec4306 First Commit 3 年前
..
.npmignore First Commit 3 年前
History.md First Commit 3 年前
Makefile First Commit 3 年前
Readme.md First Commit 3 年前
component.json First Commit 3 年前
example.html First Commit 3 年前
index.js First Commit 3 年前
package.json First Commit 3 年前

Readme.md

scroll-to

Smooth window scroll to position with requestAnimationFrame and Tween.

Installation

$ component install component/scroll-to

API

scrollTo(x, y, [options])

Scroll to the given point (x, y) with the given options:

  • ease easing function defaulting to “out-circ” (view ease for more)
  • duration animation duration defaulting to 1000
var scrollTo = require('scroll-to');

scrollTo(500, 1200, {
  ease: 'out-bounce',
  duration: 1500
});

License

MIT