请查看此页面(示例)
http://www.christinamichael.in/create-a-powerful-human-disintegration-effect-in-photoshop
字符串我想知道我怎么能有这样的?我想在火狐和Chrome支持的东西。
uujelgoq1#
你可以使用锚标签进行平滑滚动。下面是结果。$public function(){('a [href*=#]:not([href=#]否').单击function(){(location.pathname.replace(/^//,'')== this.pathname.replace(/^//,'')&& location.hostname == this.hostname){ var target = $(this.hash); target = target.length?target:$('[name=' + this.hash.slice(1)+']'); if(target.length){ $('html,body').animate({ scrollTop:target.offset().top },1000); return false; } } }); });
1条答案
按热度按时间uujelgoq1#
你可以使用锚标签进行平滑滚动。下面是结果。
$public function(){('a [href*=#]:not([href=#]否').单击function(){(location.pathname.replace(/^//,'')== this.pathname.replace(/^//,'')&& location.hostname == this.hostname){ var target = $(this.hash); target = target.length?target:$('[name=' + this.hash.slice(1)+']'); if(target.length){ $('html,body').animate({ scrollTop:target.offset().top },1000); return false; } } }); });