我正在开发像agentur-loop.com这样的项目。 我想知道当前屏幕是如何关闭的,而不是整个页面。
答案 0 :(得分:0)
您可以创建一个函数,然后像这样使用它:
$(function () {
$("li").click(function(){
scrolView(this.id);
});
});
功能:
function scrolView(i) {
$('div').each(function () {
if (($(this).attr('id'))==i) {
$('html, body').animate({
scrollTop: $(this).offset().top
}, 1000);
}
});
}