Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

page background image transition on scroll via css3/javascript

I am looking for some solution for page's background image (animation) transition on scroll when move to next or previous div via scrolling or link button. Here is the example site http://zurb.com/manifesto background with objects move/animate along scroll. If anyone could help with this technique.

like image 435
Faisal Avatar asked Apr 15 '13 00:04

Faisal


People also ask

How do I change the background image on scroll?

Set the background-size to "cover" to scale the images as large as possible to cover all the background area. Add links of the images with the background-image property. Style the content giving it a border and setting the width and height of it. Set the position to "fixed" so as it will be fixed while scrolling.

How do I make my background image scroll in CSS?

To keep your background fixed, scroll, or local in CSS, we have to use the background-attachment property. Background-attachment: This property is used in CSS to set a background image as fixed or scroll. The default value of this property is scroll.

Which property is used to make background image to scroll along with the other content of the page?

The background-attachment property sets whether a background image scrolls with the rest of the page, or is fixed.


1 Answers

What you are looking for is a parallax scrolling plugin. Here are some links with a couple of options:

  • http://www.impressivewebs.com/parallax-scrolling-scripts-plugins/
  • http://smashinghub.com/7-jquery-parallax-and-scrolling-effect-plugins.htm
  • http://idesignow.com/jquery/9-jquery-parallax-scrolling-plugins-tutorials.html#.UWtI4LWZ-vs

And here are a couple of tutorials:

  • http://richardshepherd.com/smashing/parallax/
  • http://net.tutsplus.com/tutorials/html-css-techniques/simple-parallax-scrolling-technique
  • http://pepsized.com/merry-scrolling-with-skrollr-js/

Once you know what it is called you will be able to find more examples and tutorials to help you out.

like image 64
Simon C Avatar answered Oct 19 '22 18:10

Simon C