Skip to content

Instantly share code, notes, and snippets.

@DominicFinn
Created January 25, 2021 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominicFinn/690ad5d6de1e97c430ca3d1866bb6160 to your computer and use it in GitHub Desktop.
Save DominicFinn/690ad5d6de1e97c430ca3d1866bb6160 to your computer and use it in GitHub Desktop.
YouTube / Vimeo Parallax
<div class="jarallax" data-jarallax data-jarallax-video="https://www.youtube.com/watch?v=F3I0wRGAkxo">
<div class="demo-table">
<div class="demo-table-cell">
<h1>Just Another Parallax <small>[Jarallax]</small></h1>
<h2>Background Video Parallax (YouTube &amp; Vimeo)</h2>
<br>
<a class="github-button" href="https://github.com/nk-o/jarallax" data-style="mega" data-count-href="/nk-o/jarallax/stargazers" data-count-api="/repos/nk-o/jarallax#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star nk-o/jarallax on GitHub">Star</a>
<a class="github-button" href="https://github.com/nk-o/jarallax/archive/master.zip" data-style="mega" aria-label="Download nk-o/jarallax on GitHub">Download</a>
</div>
</div>
</div>
<div class="jarallax" data-jarallax data-jarallax-video="https://www.youtube.com/watch?v=ab0TSkLe-E0"></div>
<div class="demo-gap">
<h3>Small gap</h3>
</div>
<div class="jarallax" data-jarallax data-jarallax-video="https://vimeo.com/110138539"></div>
<div class="jarallax" data-jarallax data-jarallax-video="https://vimeo.com/channels/staffpicks/151926492"></div>
<div class="jarallax" data-jarallax style="background-image: url(https://free.nkdev.info/jarallax/images/image5.jpg);"></div>
<div class="demo-gap">
<p>
Jarallax © 2016 _nK released under WTFPL license
</p>
<small>
All images taken from <a href="https://www.pexels.com/">https://www.pexels.com/</a>
</small>
</div>
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
<script src="https://unpkg.com/jarallax@1.10/dist/jarallax.min.js"></script>
<script src="https://unpkg.com/jarallax@1.10/dist/jarallax-video.min.js"></script>
<link href="https://free.nkdev.info/jarallax/css/demo.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" />

YouTube / Vimeo Parallax

Add background YouTube and Vimeo parallax with Jarallax plugin. Not only video, but also high performance images parallax for free.

A Pen by nK on CodePen.

License.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment