0
在documentation中,它列出了使用插件的各種方法,但它們似乎都需要輸入數字(例如「scrollTo:{y:250}」)。我想知道是否有一種方法可以輸入div ID,而不是數字。有沒有辦法使用GSAP的scrollToPlugin滾動到div ID?
jQuery(document).ready(function($){
$('.full-streams-link').on('click', 'a', function(e) {
e.preventDefault();
TweenLite.to(window, .4, {
scrollTo: {y:500},
ease: Power2.easeOut,
force3D: true
});
});
});
真棒!無論如何,從'#元素'使其爲-10px?編輯:沒關係。我可以在最後加上-10。 – J82