1
0

scroll.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>reveal.js - Scroll View</title>
  6. <meta
  7. name="viewport"
  8. content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
  9. />
  10. <link rel="stylesheet" href="../dist/reset.css" />
  11. <link rel="stylesheet" href="../dist/reveal.css" />
  12. <link rel="stylesheet" href="../dist/theme/black.css" id="theme" />
  13. <link rel="stylesheet" href="../dist/plugin/highlight/monokai.css" />
  14. </head>
  15. <body>
  16. <div class="reveal">
  17. <div class="slides">
  18. <section><h1>Scroll View</h1></section>
  19. <section data-background="indigo">
  20. <h2>Scroll triggered fragments</h2>
  21. <ul>
  22. <li class="fragment fade-left">Step one</li>
  23. <li class="fragment fade-left">Step two</li>
  24. <li class="fragment fade-left">Step three</li>
  25. </ul>
  26. </section>
  27. <section data-background-color="#fff">
  28. <h2>Scrollbar inverts<br />based on slide bg</h2>
  29. </section>
  30. <section
  31. data-auto-animate
  32. data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)"
  33. >
  34. <h2>Auto-Animate</h2>
  35. <p>Scroll triggered auto-animations 😍</p>
  36. <div class="r-hstack justify-center">
  37. <div
  38. data-id="box1"
  39. style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px"
  40. ></div>
  41. <div
  42. data-id="box2"
  43. style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px"
  44. ></div>
  45. <div
  46. data-id="box3"
  47. style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px"
  48. ></div>
  49. </div>
  50. </section>
  51. <section
  52. data-auto-animate
  53. data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)"
  54. >
  55. <div class="r-hstack justify-center">
  56. <div
  57. data-id="box1"
  58. data-auto-animate-delay="0"
  59. style="background: cyan; width: 150px; height: 100px; margin: 10px"
  60. ></div>
  61. <div
  62. data-id="box2"
  63. data-auto-animate-delay="0.1"
  64. style="background: magenta; width: 150px; height: 100px; margin: 10px"
  65. ></div>
  66. <div
  67. data-id="box3"
  68. data-auto-animate-delay="0.2"
  69. style="background: yellow; width: 150px; height: 100px; margin: 10px"
  70. ></div>
  71. </div>
  72. <h2 style="margin-top: 20px">Auto-Animate</h2>
  73. </section>
  74. <section
  75. data-auto-animate
  76. data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)"
  77. >
  78. <div class="r-stack">
  79. <div
  80. data-id="box1"
  81. style="background: cyan; width: 300px; height: 300px; border-radius: 200px"
  82. ></div>
  83. <div
  84. data-id="box2"
  85. style="background: magenta; width: 200px; height: 200px; border-radius: 200px"
  86. ></div>
  87. <div
  88. data-id="box3"
  89. style="background: yellow; width: 100px; height: 100px; border-radius: 200px"
  90. ></div>
  91. </div>
  92. <h2 style="margin-top: 20px">Auto-Animate</h2>
  93. </section>
  94. <section
  95. data-background-gradient="linear-gradient(to bottom, #283b95, #17b2c3)"
  96. id="gradient-bg"
  97. >
  98. <h2 data-id="code-title">Code highlights,<br />meet scroll triggers</h2>
  99. <pre
  100. data-id="code-animation"
  101. ><code class="hljs javascript" data-trim data-line-numbers="|4,8-11|17|22-24"><script type="text/template">
  102. import React, { useState } from 'react';
  103. function Example() {
  104. const [count, setCount] = useState(0);
  105. return (
  106. <div>
  107. <p>You clicked {count} times</p>
  108. <button onClick={() => setCount(count + 1)}>
  109. Click me
  110. </button>
  111. </div>
  112. );
  113. }
  114. function SecondExample() {
  115. const [count, setCount] = useState(0);
  116. return (
  117. <div>
  118. <p>You clicked {count} times</p>
  119. <button onClick={() => setCount(count + 1)}>
  120. Click me
  121. </button>
  122. </div>
  123. );
  124. }
  125. </script></code></pre>
  126. </section>
  127. <section class="stack">
  128. <section
  129. data-background="https://static.slid.es/reveal/image-placeholder.png"
  130. id="image-bg"
  131. >
  132. <h2>Image Backgrounds</h2>
  133. </section>
  134. <section
  135. data-background-video-muted
  136. data-background-video="https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm"
  137. >
  138. <h2>Video background</h2>
  139. </section>
  140. </section>
  141. <section><h2>The end</h2></section>
  142. </div>
  143. </div>
  144. <script src="../dist/reveal.js"></script>
  145. <script src="../dist/plugin/notes.js"></script>
  146. <script src="../dist/plugin/markdown.js"></script>
  147. <script src="../dist/plugin/highlight.js"></script>
  148. <script>
  149. Reveal.initialize({
  150. view: 'scroll',
  151. hash: true,
  152. plugins: [RevealMarkdown, RevealHighlight, RevealNotes],
  153. });
  154. </script>
  155. </body>
  156. </html>