Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change scroll speed of specific element [closed]

Tags:

html

css

Okay, I'm not sure how to Script this... but either in HTML or CSS is there a way to set a faster scrolling speed to any specific item?

like image 393
Mohammad Al-Ahdal Avatar asked Jun 21 '13 03:06

Mohammad Al-Ahdal


1 Answers

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 (ie parallax), you can reference this post.

For more information see this answer.

like image 131
zey Avatar answered Oct 24 '22 05:10

zey