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