Change the scroll speed of a specific item

Ok, I'm not sure how Script is ... but is there either a way in HTML or CSS to set a faster scroll speed on any particular element?

+6
source share
1 answer

Try using JS:

function pageScroll() { window.scrollBy(0,50); scrolldelay = setTimeout('pageScroll()',100); } <body onLoad="pageScroll()"> 

You can see an example here .

For a CSS solution (like parallax), you can refer to this post.

See this answer for more information.

+4
source

Source: https://habr.com/ru/post/1487403/


All Articles