Solved

scrolling background images

Posted on 2013-06-28
6
283 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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 style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

789 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