Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick

background-attachment: parallax

CSS defines background-attachment which can be scroll or fixed.

I want:
  background-image: url(something.jpg);
  background-attachment: parallax;
  background-parallax-ratio: 0.5;
(I want my background image to scroll at some ratio of the speed of the text.)

I bet this could be accomplished with some DHTML ... connect document.onScroll to some code which modifies the repeated background vertical offset to (vert_scroll * ratio % image_height) or something.

Somebody make this for me and I'll buy you a present. I have no practical use for it, but I want to see it....

I thought I found it, but this doesn't seem to be it:

It doesn't work in Mozilla or IE, nor is it what I want, even if it did work.

  • Happy Birthday!

    Happy 20th Birthday, LiveJournal! 🐐🎂🎉

  • hi

    Posting from the iPhone app. Maybe I'm unblocked now.

  • Why, hello...

    Long time no see. How's my baby doing?

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.