8

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?

icedwater
  • 4,701
  • 3
  • 35
  • 50
Mohammad Al-Ahdal
  • 758
  • 2
  • 8
  • 21
  • **Sidenote:** HTML is markup and CSS involves styling via stylesheets. Neither of which are scripting. The only things I can imagine you would want to scroll are windows and textboxes, so if it does(n't) involve either of those, you should clarify your question. – BLaZuRE Jun 21 '13 at 03:29
  • @BLaZuRE For example I have an image and a

    Text

    .I want the text to go down normally when scrolling and I want the image to scroll down twice as fast as the text. So when a user on the website scrolls down, the picture will come on and go off the screen a lot faster than the text.
    – Mohammad Al-Ahdal Jun 21 '13 at 04:00

1 Answers1

3

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.

Kalnode
  • 9,386
  • 3
  • 34
  • 62
zey
  • 5,939
  • 14
  • 56
  • 110
  • 3
    if I had a rep of 15 or over, I'd rate you 1 up <3 Thanksss – Mohammad Al-Ahdal Jun 21 '13 at 05:07
  • 3
    This answer doesn't seem to match the original question as the OP asks only about changing scroll speed (in what one would assume is the user's manual scroll speed), and it's not asking about automatically scrolling a certain distance at a certain speed. – Kalnode Apr 08 '19 at 01:58