scroll.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>reveal.js - Scroll View</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  7. <link rel="stylesheet" href="../dist/reset.css">
  8. <link rel="stylesheet" href="../dist/reveal.css">
  9. <link rel="stylesheet" href="../dist/theme/black.css" id="theme">
  10. <link rel="stylesheet" href="../plugin/highlight/monokai.css">
  11. </head>
  12. <body>
  13. <div class="reveal">
  14. <div class="slides">
  15. <section><h1>Scroll View</h1></section>
  16. <section data-background="indigo">
  17. <h2>Scroll triggers</h2>
  18. <ul>
  19. <li class="fragment fade-left">Step one</li>
  20. <li class="fragment fade-left">Step two</li>
  21. <li class="fragment fade-left">Step three</li>
  22. </ul>
  23. </section>
  24. <section data-background-color="#fff"><h2>Scroll bar inverts<br>based on slide bg</h2></section>
  25. <section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
  26. <h2>Auto-Animate</h2>
  27. <p>Automatically animate matching elements across slides with <a href="https://revealjs.com/auto-animate/">Auto-Animate</a>.</p>
  28. <div class="r-hstack justify-center">
  29. <div data-id="box1" style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px;"></div>
  30. <div data-id="box2" style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px;"></div>
  31. <div data-id="box3" style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px;"></div>
  32. </div>
  33. </section>
  34. <section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
  35. <div class="r-hstack justify-center">
  36. <div data-id="box1" data-auto-animate-delay="0" style="background: cyan; width: 150px; height: 100px; margin: 10px;"></div>
  37. <div data-id="box2" data-auto-animate-delay="0.1" style="background: magenta; width: 150px; height: 100px; margin: 10px;"></div>
  38. <div data-id="box3" data-auto-animate-delay="0.2" style="background: yellow; width: 150px; height: 100px; margin: 10px;"></div>
  39. </div>
  40. <h2 style="margin-top: 20px;">Auto-Animate</h2>
  41. </section>
  42. <section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
  43. <div class="r-stack">
  44. <div data-id="box1" style="background: cyan; width: 300px; height: 300px; border-radius: 200px;"></div>
  45. <div data-id="box2" style="background: magenta; width: 200px; height: 200px; border-radius: 200px;"></div>
  46. <div data-id="box3" style="background: yellow; width: 100px; height: 100px; border-radius: 200px;"></div>
  47. </div>
  48. <h2 style="margin-top: 20px;">Auto-Animate</h2>
  49. </section>
  50. <section data-background-gradient="linear-gradient(to bottom, #283b95, #17b2c3)" id="gradient-bg">
  51. <h2>Gradient Backgrounds</h2>
  52. </section>
  53. <section data-auto-animate>
  54. <h2 data-id="code-title">Scroll triggered code highlights</h2>
  55. <pre data-id="code-animation"><code class="hljs javascript" data-trim data-line-numbers="|4,8-11|17|22-24"><script type="text/template">
  56. import React, { useState } from 'react';
  57. function Example() {
  58. const [count, setCount] = useState(0);
  59. return (
  60. <div>
  61. <p>You clicked {count} times</p>
  62. <button onClick={() => setCount(count + 1)}>
  63. Click me
  64. </button>
  65. </div>
  66. );
  67. }
  68. function SecondExample() {
  69. const [count, setCount] = useState(0);
  70. return (
  71. <div>
  72. <p>You clicked {count} times</p>
  73. <button onClick={() => setCount(count + 1)}>
  74. Click me
  75. </button>
  76. </div>
  77. );
  78. }
  79. </script></code></pre>
  80. </section>
  81. <section class="stack">
  82. <section data-background="https://static.slid.es/reveal/image-placeholder.png" id="image-bg">
  83. <h2>Image Backgrounds</h2>
  84. <pre><code class="hljs html">&lt;section data-background="image.png"&gt;</code></pre>
  85. </section>
  86. <section data-background-video-muted 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">
  87. <h2>Video background</h2>
  88. </section>
  89. </section>
  90. <section><h2>The end</h2></section>
  91. </div>
  92. </div>
  93. <script src="../dist/reveal.js"></script>
  94. <script src="../plugin/notes/notes.js"></script>
  95. <script src="../plugin/markdown/markdown.js"></script>
  96. <script src="../plugin/highlight/highlight.js"></script>
  97. <script>
  98. Reveal.initialize({
  99. view: 'scroll',
  100. hash: true,
  101. plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
  102. });
  103. </script>
  104. </body>
  105. </html>