Hot Koehls
  • Email
  • Feedburner
  • Linkedin
  • Twitter
  • Home
  • About
  • Archives
  • Contact
  • Software
    • S3imple Backup
    • Twitter Feed Archiver
    • FileTime
    • Flickr API Demo
Search
Home» For entrepreneurs » New scroll transition effect – a breakdown

New scroll transition effect – a breakdown

Posted by Frank - December 10, 2009 - For entrepreneurs, For everyone, For techies
1

I was just perusing ThinkGeek for Christmas gift ideas when I noticed that the overflow graphics — the stuff that appears to left and right of the main content at larger screen resolutions — was different depending on where you scrolled. At the top it showed robots, and zombies at the bottom. Check it out for yourself, the homepage has it.

Cool, right? Here’s how they did it. First, the robot and zombies elements are actually all in one image. The following image is set as the CSS background-image for <div id="fancywrapper">…

http://www.thinkgeek.com/images/sitewide/backgrounds/robozombies7.png

Note the color differences in the elements. Now look at the background-image for the <div id="wrapper"> tag…

http://www.thinkgeek.com/images/sitewide/backgrounds/bodytilebottom-tall.jpg

It’s really tough to see in the image by itself, but there’s a color transition in effect here, the bottom is full black (like the robots), and the top is a dark gray (like the zombies). Don’t believe me? Hook up the Colorzilla Firefox add-on and scan the image from top to bottom.

This image is then locked to the bottom of the screen and repeated across the base of the page (background-position:left bottom; background-repeat:repeat-x;). The upper areas of the page, past the height of bodytilebottom-tall.jpg, get background color from the <body> tag, which matches the dark gray of bodytilebottom-tall.jpg. The final effect is a seamless visual transition from dark gray up top to black at the very bottom.

To get the robots and zombies into place, it’s simple CSS definitions to place it at the bottom (background-attachment:fixed; background-position:center bottom; background-repeat:repeat-x;).

Finally, with robozombies7.png locked into position on the screen, over top of a scroll-enabled bodytilebottom-tall.jpg, we get the fade effect as the user scrolls the towards the bottom of the page.

Like I said, cool, right?

P.S. Want to break down site layouts and effects yourself? You need 3 things…

  • Mozilla Firefox
  • Firebug add-on
  • Web Developer toolbar

One comment on “New scroll transition effect – a breakdown”

  1. Jason Coleman says:
    December 11, 2009 at 4:12 pm

    That is awesome. Thanks for breaking it down. Now I need an excuse to do something like this on one of my sites.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Categories

  • For entrepreneurs
  • For everyone
  • For techies

Latest Tweets

  • The word traps planners plan themselves into | Life. Then strategy http://t.co/iANAdASb
    May 8, 2012 - 2:43 pm
  • Random network security tip for those about to appear on TV - Boing Boing http://t.co/tC1lXFQ4
    May 8, 2012 - 1:42 pm
  • A Picture http://t.co/H846Uy69
    April 27, 2012 - 12:25 pm
  • The Broken "Buy-One, Give-One" Model: 3 Ways to Save Toms Shoes | Co.Exist: World changing ideas and innovation http://t.co/RI0sVMW6
    April 10, 2012 - 12:23 pm

Recent Comments

  • whiz on What 255 characters looks like
  • Andrew on Find the second (or third, or fourth) occurence in a string
  • IanArcher on Get number of message parts in an email using PHP
  • Usama on Remove parent directories from tar archives
  • Frank on It’s dangerous to go alone

Recent Posts

  • It’s dangerous to go alone
  • Create Self-Signed Wildcard SSL Certificate
  • What comes after the yottabyte?
  • Write code like they do in Hollywood
  • Brian Rolle machine gun celebration
(c) 2012 Frank Koehl. All Rights Reserved.
  • Contact Us
  • Sitemap