with this demo<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"Smooth scrolling (the animated change of position within the viewport from the originating link to the destination anchor) can be a nice interaction detail added to a site, giving a polished feel to the experience. If you don’t believe me, look at how many people have responded to the Smooth Scrolling snippet here on CSS-Tricks.<\/p>\n","protected":false},"author":243824,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[4],"tags":[466,754,1215],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":294680,"url":"https:\/\/css-tricks.com\/need-to-scroll-to-the-top-of-the-page\/","url_meta":{"origin":253531,"position":0},"title":"Need to scroll to the top of the page?","date":"September 2, 2019","format":false,"excerpt":"Perhaps the easiest way to offer that to the user is a link that targets an ID on the element. So like... Jump to top of page But we've got a few options here. If you want it to smooth scroll up to the top, you can do that in\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/08\/smooth-stones.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":254403,"url":"https:\/\/css-tricks.com\/focus-styles-non-interactive-elements\/","url_meta":{"origin":253531,"position":1},"title":"Focus Styles on Non-Interactive Elements?","date":"May 2, 2017","format":false,"excerpt":"Last month, Heather Migliorisi looked at the accessibility of Smooth Scrolling. In order to do smooth scrolling, you: Check if the clicked link is #jump link Stop the browser default behavior of jumping immediately to that element on the page Animate the scrolling to the element the #jump link pointed\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":252840,"url":"https:\/\/css-tricks.com\/scrolling-web-primer\/","url_meta":{"origin":253531,"position":2},"title":"Scrolling on the Web: A Primer","date":"March 16, 2017","format":false,"excerpt":"Scrolling is complicated. Nolan Lawson: User scrolls with two fingers on a touch pad User scrolls with one finger on a touch screen User scrolls with a mouse wheel on a physical mouse User clicks the sidebar and drags it up and down User presses up, down, PageUp, PageDown, or\u2026","rel":"","context":"In "Link"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":283203,"url":"https:\/\/css-tricks.com\/downsides-of-smooth-scrolling\/","url_meta":{"origin":253531,"position":3},"title":"Downsides of Smooth Scrolling","date":"March 11, 2019","format":false,"excerpt":"Smooth scrolling has gotten a lot easier. If you want it all the time on your page, and you are happy letting the browser deal with the duration for you, it's a single line of CSS: html { scroll-behavior: smooth; } I tried this on version 17 of this site,\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/07\/smooth-scroll-nav.gif?fit=800%2C400&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":333276,"url":"https:\/\/css-tricks.com\/cancelable-smooth-scrolling\/","url_meta":{"origin":253531,"position":4},"title":"“Cancelable” Smooth Scrolling","date":"February 1, 2021","format":false,"excerpt":"Here's the situation: Your site offers a \"scroll back to top\" button, and you've implemented smooth scrolling. As the page scrolls back to the top, users see something that catches their eye and they want to stop the scrolling, so they do a smidge of a scroll on the mouse\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/09\/scroll-to-top.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":332473,"url":"https:\/\/css-tricks.com\/fixing-smooth-scrolling-with-find-on-page\/","url_meta":{"origin":253531,"position":5},"title":"Fixing Smooth Scrolling with Find-on-Page","date":"January 12, 2021","format":false,"excerpt":"Back when we released the v17 design (we're on v18 now) of this site. I added html { scroll-behavior: smooth; } to the CSS. Right away, I got comments like this (just one example): ... when you control+f or command+f and search on CSS-Tricks, it\u2019ll scroll very slowly instead of\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/01\/smooth-scroll.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"featured_media_src_url":null,"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/253531"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/243824"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=253531"}],"version-history":[{"count":19,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/253531\/revisions"}],"predecessor-version":[{"id":253748,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/253531\/revisions\/253748"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=253531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=253531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=253531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}