directions.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <title></title>
  8. <style>
  9. html,
  10. body {
  11. color: #223;
  12. font-size: 21pt;
  13. margin: 0;
  14. padding: 0;
  15. }
  16. nav {
  17. font-size: 21pt;
  18. line-height: 1.5em;
  19. position: fixed;
  20. bottom: 0;
  21. left: 0;
  22. }
  23. nav a {
  24. color: inherit;
  25. }
  26. .col {
  27. text-align: center;
  28. width: 50%;
  29. float: left;
  30. box-sizing: border-box;
  31. }
  32. h4 {
  33. text-align: center;
  34. }
  35. .container {
  36. outline: 1px solid #eed;
  37. font-size: 42pt;
  38. padding: 37.5vh 12.5vw;
  39. }
  40. .block {
  41. background: #223;
  42. color: #eed;
  43. line-height: 25vh;
  44. text-align: right;
  45. padding: 0 42pt;
  46. position: relative;
  47. }
  48. span {
  49. background: #eed;
  50. color: #223;
  51. line-height: 25vh;
  52. text-align: left;
  53. padding: 0 42pt;
  54. display: block;
  55. width: 50%;
  56. position: absolute;
  57. top: 0;
  58. left: 0;
  59. box-sizing: border-box;
  60. }
  61. </style>
  62. </head>
  63. <body>
  64. <h4>verticalScroll X / verticalScroll XY</h4>
  65. <section>
  66. <div class="col">
  67. <div class="container">
  68. <div class="block">#1<span class="rellax" data-rellax-vertical-scroll-axis="x">#1</span></div>
  69. </div>
  70. </div>
  71. <div class="col">
  72. <div class="container">
  73. <div class="block">#1<span class="rellax" data-rellax-vertical-scroll-axis="xy">#1</span></div>
  74. </div>
  75. </div>
  76. </section>
  77. <h4>speedX = 3 / speedX = 1, speedY = 2</h4>
  78. <h4>verticalScroll X / verticalScroll XY</h4>
  79. <section>
  80. <div class="col">
  81. <div class="container">
  82. <div class="block">#2<span class="rellax" data-rellax-horizontal-speed="3" data-rellax-vertical-scroll-axis="x">#2</span></div>
  83. </div>
  84. </div>
  85. <div class="col">
  86. <div class="container">
  87. <div class="block">#2<span class="rellax" data-rellax-horizontal-speed="1" data-rellax-vertical-speed="2" data-rellax-vertical-scroll-axis="xy">#2</span></div>
  88. </div>
  89. </div>
  90. </section>
  91. <h4>MaxX 200 / MinX -215 MinY -300</h4>
  92. <h4>verticalScroll X / verticalScroll XY</h4>
  93. <section>
  94. <div class="col">
  95. <div class="container">
  96. <div class="block">#3<span class="rellax" data-rellax-vertical-scroll-axis="x" data-rellax-max-x="200">#3</span></div>
  97. </div>
  98. </div>
  99. <div class="col">
  100. <div class="container">
  101. <div class="block">#3<span class="rellax" data-rellax-speed="2" data-rellax-vertical-scroll-axis="xy" data-rellax-min-x="-215" data-rellax-min-y="-300">#3</span></div>
  102. </div>
  103. </div>
  104. </section>
  105. <!-- Scripts -->
  106. <script src="../rellax.js"></script>
  107. <script>
  108. var rellax = new Rellax('.rellax', {
  109. horizontal: true,
  110. });
  111. </script>
  112. </body>
  113. </html>