Skip to content

Commit 9894fa9

Browse files
authored
Update README.md
1 parent 8305326 commit 9894fa9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,16 @@ Events 列表
139139

140140
## 派发滚动
141141

142-
- scrollTo(x, y, time, easing)
143-
144-
142+
- scrollTo(x, y, time, easing) 滚动到某个位置,x,y 代表坐标,time 表示动画时间,easing 表示缓动函数
145143

146144
Example:
147145

148146
```javascript
149147
let scroll = new BScroll(document.getElementById('wrapper'))
150148
scroll.scrollTo(0, 500)
151149
...
152-
```
150+
``
151+
- scrollToElement(el, time, offsetX, offsetY, easing) 滚动到
152+
 某个元素,el(必填) 表示 dom 元素,time 表示动画,offsetX 和 offsetY 表示坐标偏移量,easing 表示缓动函数
153153

154154

0 commit comments

Comments
 (0)