vadnica-logo
X

CSS Property: scroll-behavior

The scroll-behavior property determines whether the scroll position should animate smoothly, instead of "jumping", when a user clicks an internal scroll link. Note: When using the scroll-behavior: smooth property, you may encounter specific behavior related to browser history - the "Back" button sometimes requires multiple clicks to return to the previous page.

EXAMPLE
RESULT

Welcome to the scroll-behavior DEMO

This example demonstrate the use of the CSS scroll-behavior property.

Currently, is jump to the target immediately (auto), enabled.

Click on the link in the navigation or scroll down.

How does it work?

scroll-behavior: smooth - allows for smooth animated scrolling

scroll-behavior: auto - jumps to the target immediately

Use the botton below to switch between modes.

Practical application

Smooth scrolling improves the user experience on websites.

Especially useful for:

  • Single-page applications
  • Long articles with navigation
  • Portfolio and showcase pages
Trenutni način: Auto

Thank you for visiting! Adding privacy policy.

© 2024 All rights reserved.

Vam je koda pomagala? Če želite podpreti moj trud pri pripravi vodičev in vzdrževanju strani, mi lahko namenite donacijo za kavo.