Parallax Image Preview Plugin for Page Scrolling
Add-ons

Plugin description: A visual parallax effect in which images move asynchronously with the page when scrolling downward.
Last updated: 2019-08-07 11:14:41
Usage
Include the following files in your page.
1 2 3 | <link rel="stylesheet" type="text/css" href="css/base.css" /><script src="js/imagesloaded.pkgd.min.js"></script> <script src="js/demo.js"></script> |
html
1 2 3 4 5 6 7 8 9 10 11 12 | <div class="content"> <div class="item"> <div class="item__img-wrap"> <div class="item__img item__img--t1"></div> </div> <div class="item__caption"> <h2 class="item__caption-title">Central view</h2> <p class="item__caption-copy">Great turbulent clouds emerged into consciousness citizens.</p> </div> </div> .....</div> |
Modify the images in lines 153–201 of base.css.
js
1 2 3 4 5 6 | document.documentElement.className = "js";var supportsCssVars = function() { var e, t = document.createElement("style"); return t.innerHTML = "root: { --tmp-var: bold; }", document.head.appendChild(t), e = !!(window.CSS && window.CSS.supports && window.CSS.supports("font-weight", "var(--tmp-var)")), t.parentNode.removeChild(t), e};supportsCssVars() || alert("Please view this demo in a modern browser that supports CSS Variables."); |
评论