index.html 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  6. <title>skrollr - parallax scrolling for the masses</title>
  7. <link href="examples/fixed-positioning.css" rel="stylesheet" type="text/css" />
  8. <link href="examples/main.css" rel="stylesheet" type="text/css" />
  9. </head>
  10. <body>
  11. <div id="bg1" data-0="background-position:0px 0px;" data-end="background-position:-500px -10000px;"></div>
  12. <div id="bg2" data-0="background-position:0px 0px;" data-end="background-position:-500px -8000px;"></div>
  13. <div id="bg3" data-0="background-position:0px 0px;" data-end="background-position:-500px -6000px;"></div>
  14. <div id="progress" data-0="width:0%;background:hsl(200, 100%, 50%);" data-end="width:100%;background:hsl(920, 100%, 50%);"></div>
  15. <div id="intro" data-0="opacity:1;top:3%;transform:rotate(0deg);transform-origin:0 0;" data-500="opacity:0;top:-10%;transform:rotate(-90deg);">
  16. <h1><a href="https://github.com/Prinzhorn/skrollr">skrollr</a></h1>
  17. <h2>parallax scrolling for the masses</h2>
  18. <p>let's get scrollin' ;-)</p>
  19. <p class="arrows">▼&nbsp;▼&nbsp;▼</p>
  20. </div>
  21. <div id="transform" data-500="transform:scale(0) rotate(0deg);" data-1000="transform:scale(1) rotate(1440deg);opacity:1;" data-1600="" data-1700="transform:scale(5) rotate(3240deg);opacity:0;">
  22. <h2>transform</h2>
  23. <p>scale, skew and rotate the sh** out of any element</p>
  24. </div>
  25. <div id="properties" data-1700="top:100%;" data-2200="top:0%;" data-3000="display:block;" data-3700="top:-100%;display:none;">
  26. <h2>all numeric properties</h2>
  27. <p>width, height, padding, font-size, z-index, blah blah blah</p>
  28. </div>
  29. <div id="easing_wrapper" data-0="display:none;" data-3900="display:block;" data-4900="background:rgba(0, 0, 0, 0);color[swing]:rgb(0,0,0);" data-5900="background:rgba(0,0,0,1);color:rgb(255,255,255);" data-10000="top:0%;" data-12000="top:-100%;">
  30. <div id="easing" data-3900="left:100%" data-4600="left:25%;">
  31. <h2>easing?</h2>
  32. <p>sure.</p>
  33. <p>let me dim the <span data-3900="" data-4900="color[swing]:rgb(0,0,0);" data-5900="color:rgb(255,255,0);">lights</span> for this one...</p>
  34. <p data-5900="opacity:0;font-size:100%;" data-6500="opacity:1;font-size:150%;">you can set easings for each property and define own easing functions</p>
  35. </div>
  36. <div class="drop" data-6500="left:15%;bottom:100%;" data-9500="bottom:0%;">linear</div>
  37. <div class="drop" data-6500="left:25%;bottom[quadratic]:100%;" data-9500="bottom:0%;">quadratic</div>
  38. <div class="drop" data-6500="left:35%;bottom[cubic]:100%;" data-9500="bottom:0%;">cubic</div>
  39. <div class="drop" data-6500="left:45%;bottom[swing]:100%;" data-9500="bottom:0%;">swing</div>
  40. <div class="drop" data-6500="left:55%;bottom[WTF]:100%;" data-9500="bottom:0%;">WTF</div>
  41. <div class="drop" data-6500="left:65%;bottom[inverted]:100%;" data-9500="bottom:0%;">inverted</div>
  42. <div class="drop" data-6500="left:75%;bottom[bounce]:100%;" data-9500="bottom:0%;">bounce</div>
  43. </div>
  44. <div id="download" data-10000="top[cubic]:100%;border-radius[cubic]:0em;background:rgb(0,50,100);border-width:0px;" data-12000="top:10%;border-radius:2em;background:rgb(190,230,255);border-width:10px;">
  45. <h2>the end</h2>
  46. <p>by the way, you can also animate colors (you did notice this, didn't you?)</p>
  47. <p><strong>Now get this thing on <a href="https://github.com/Prinzhorn/skrollr">GitHub</a> and spread the word, it's open source!</strong> <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://prinzhorn.github.com/skrollr/" data-via="Prinzhorn">Tweet</a>
  48. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></p>
  49. <p>Check out more <a href="https://github.com/Prinzhorn/skrollr/tree/master/examples#examples">examples</a>.</p>
  50. <p>Handcrafted by <a href="https://twitter.com/Prinzhorn" class="twitter-follow-button" data-show-count="false">Follow @Prinzhorn</a>
  51. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></p>
  52. </div>
  53. <div id="scrollbar" data-0="top:0%;margin-top:2px;" data-end="top:100%;margin-top:-52px;"></div>
  54. <script type="text/javascript" src="dist/skrollr.min.js"></script>
  55. <!--[if lt IE 9]>
  56. <script type="text/javascript" src="../skrollr-ie/dist/skrollr.ie.min.js"></script>
  57. <![endif]-->
  58. <script type="text/javascript">
  59. var s = skrollr.init({
  60. edgeStrategy: 'set',
  61. easing: {
  62. WTF: Math.random,
  63. inverted: function(p) {
  64. return 1-p;
  65. }
  66. }
  67. });
  68. </script>
  69. </body>
  70. </html>