treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Make Element Move with Scroll

  • I don't know if it's because it's late, but for the life of me I can't work out how to do this. I want a piece of string to, when you scroll the page it looks like it's being pulled. What's the best way to go about this?

    image

    image

    Thanks in advance.
  • Are you suggesting that the 'string' would straighten? You can't do that with css 'string' AFAIK.

    I suppose it might be possible with a canvas element or perhaps you could fake something with a huge image and positioning.