平滑滚动-jQuery
这是一个简单的插图网站,用于说明平滑滚动的工作方式和外观。
复制此脚本标记并粘贴到html页面中以使用:
< script src = "https://code.jquery.com/jquery-3.5.1.min.js"
integrity = "sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin = "anonymous" > < / script >
jQuery代码块: :backhand_index_pointing_down:
{
// Smooth Scrolling
$ ( '#navbar a, .btn' ) . on ( 'click' , function ( e ) {
if ( this . hash !== '' ) {
e . preventDefault ( )
评论0
最新资源