Solved

scrolling background images

Posted on 2013-06-28
6
280 Views
Last Modified: 2013-09-12
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
Comment
Question by:stargateatlantis
6 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39284669
Each div of content contains a <figure> tag with the image.  http://www.w3schools.com/tags/tag_figure.asp
0
 

Author Comment

by:stargateatlantis
ID: 39284757
is that how you get that static scrolling effect
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 39284837
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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39284900
It works on my mac chrome Version 27.0.1453.116 as well as firefox.
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 39284918
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
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39286003
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question