Skip to content

sirdeggen/jquery_parallax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

jquery_parallax

Use this to automatically shift the background image of a div depending on how far you've scrolled past it to give a parallax type effect.

Requires jQuery in header of page:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

Assumes that there is a div somewhere like this:

<style>
  .parallax {
    height: 400px;
    width: 100%;
    background-image: url("SOMEBGIMAGE.jpg");
    background-position-y: 0%;
    background-repeat: no-repeat;
    background-size: cover;
  }
</style>
  

<div class="parallax">
</div>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published