• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 299
  • Last Modified:

scrolling background images

If you go to the following link here

http://www.thedailybeast.com/newsweek/2013/06/26/rick-rubin-on-crashing-kanye-s-album-in-15-days.html

keep scrolling down you will see multiple background images for each article how do they do that effect
0
stargateatlantis
Asked:
stargateatlantis
1 Solution
 
Scott Fell, EE MVEDeveloperCommented:
Each div of content contains a <figure> tag with the image.  http://www.w3schools.com/tags/tag_figure.asp
0
 
stargateatlantisAuthor Commented:
is that how you get that static scrolling effect
0
 
Tom BeckCommented:
Seems like you could just use a background div with position:static, load text into other divs stacked vertically on the page with more divs in between that have background:transparent. The transparent divs would act like windows through the text content to reveal the static background images. Then with javascript/jquery monitor scroll position and swap out the source of the background image on the static div so a new picture appears through the windows when scrolling past a predetermined points in the height of the page.

Shame it does not work on that site in Chrome v27. At least not on a Mac. The images are just fixed. Works in Firefox though. Nice effect!
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Scott Fell, EE MVEDeveloperCommented:
It works on my mac chrome Version 27.0.1453.116 as well as firefox.
0
 
Tom BeckCommented:
I have the same version of Chrome. The images are fixed on the page. I looked through the plugins and none are disabled. Weird.
0
 
GaryCommented:
They are using background-attachment fixed, with a bottom padding
This is what is giving the effect.

A stripped down version.
http://jsfiddle.net/2UZDs/
If you remove the bottom padding or the fixed class the effect is gone
It is, as Tommy has said, a very nice unobtrusive effect, never seem it anywhere else
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now