我已经实例化了一个YUI,我需要立即滚动到底部(也是在稍后添加一些元素之后)。你知道我该怎么做吗?
以下是到目前为止的代码:
yInstance = YUI();
yInstance.use('scrollview-base', function(Y) {
Y.scrollview = new Y.ScrollView({
id:"scrollview",
srcNode: '#scrollview-content',
height: main_scrollable_div_height,
flick: {
minDistance: 10,
minVelocity: 0.3,
axis: "y"
},
axis: "y"
});
Y.scrollview.render();
});发布于 2014-08-12 00:34:02
明白了!
解决方案是在初始化"scrollY: max_height“时添加以下内容:
Y.scrollview = new Y.ScrollView({
id:"scrollview",
srcNode: '#scrollview-content',
height: main_scrollable_div_height,
flick: {
minDistance: 10,
minVelocity: 0.3,
axis: "y"
},
axis: "y",
scrollY: max_height
});https://stackoverflow.com/questions/25247722
复制相似问题