
The inherent value inherits the value from the parent element. In this case, initial and auto will behave in the same way as the auto is the default behavior. The initial value sets the default behavior of a property like color, align, etc. The initial is the reserved keyword for Smooth Scroll in CSS and not a value specific to scroll-behavior. The smooth value of smooth-behavior for Smooth Scroll in CSS changes the element’s scroll behavior from a direct jump to a smooth transition from one element to another. The auto value of smooth-behavior in CSS is the default value of the scroll-behavior which is the direct jump from one element to another. The smooth-behavior property for Smooth Scroll in CSS takes four values: This property is called “ smooth-behavior”.

We will explore all of the three Smooth scrolls in detail.ĬSS provides us a standard property to make a page that scrolls smoothly. You can achieve Smooth scroll with CSS, JavaScript, and Jquery. The best thing about creating a smooth scroll is that we get options according to our convenience for creating a smooth-scroll web page. Smooth scrolling is a very important, useful, and common feature used in web development today. If I change the scrolling to smooth, the image would look like this:ĭoesn’t it look more graceful and a good choice that a user might prefer? The above image uses id as the navigation link for the same page to demonstrate how the page moves when clicked on the link. Let’s see a small demo difference between normal scrolling and smooth scrolling: As a default scroll behavior, the scroll is very abrupt and sudden but when the smooth scrolling is active on a web page, the web page scrolls down gradually which eases out the efforts by the readers who read a long web page. Smooth scrolling is exactly what its name literally suggests i.e.
#Jquery smoothscroll not working how to

Scrolling is a commonly used feature on computers. Now, before reading the post and what we are about to discuss, scroll this page using the page down key and notice if there’s an abrupt pattern (sudden jump). How would you scroll then? If you happen to have pressed the space key while navigating a page, you’d have noticed that it scrolls down a page, welcome to the club! But in addition to that, there is another way to scroll the page of the website using a dedicated key on the keyboard.

Have you ever noticed how a scroll works on a webpage? What if you are not allowed to touch the mouse or the arrow keys on the keyboard.
