I am looking to create a smooth animated scroll effect on page load to a specific position using jQuery's animate function:
$(document).ready(function () {
$('html, body').animate({
scrollTop: $('#today').offset().top - 50
}, 800, "linear");
});
While the current implementation works, it is not as fluid, especially on mobile devices where it feels jerky.
I have come across CSS animations that are very smooth utilizing transitions and transforms. I am wondering if it is possible to achieve the same smooth scrolling effect using CSS instead of jQuery?