Solved

scrolling background images

Posted on 2013-06-28
6
275 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now