发布于 2014-02-17 11:28:58
发布于 2014-02-17 11:28:41
您可以通过任何垂直滑块脚本创建它。只需使用文本而不是任何图像。
发布于 2014-02-17 11:33:55
也许可以试试像这样的jquery-平滑滚动到div。这是我的脚本,它在滚动后更改url。
$('a[href^="#"]').on('click',function(e){
$target = $(this).attr('href');
e.preventDefault();
$('.active').removeClass('active');
$(this).addClass('active');
if($(this).attr('href') == '#') {
$('html, body').stop().animate({
scrollTop: $('body').offset().top
}, 1000, function(){location.hash = $target;});
} else {
$('html, body').stop().animate({
scrollTop: $($target).offset().top + 57 - $('.main_menu').height()
}, 1000,function(){location.hash = $target});
}
return false;
});https://stackoverflow.com/questions/21827762
复制相似问题