2023年8月
按 space,或者 ⬇ 进入竖向页面
按 ESC 进行全览
按 S 进入 演示模式
按 F 进入全屏
按 B 或者 . 可以暂停演示
CTRL+Shift+F 搜索,(来自插件search.js)
Alt+click(CTRL+click in Linux) 用来局部放大(来自插件 zoom.js)
正文:垂直页适合用来添加细节
好了,可以上去了
tr + th 标签 | 标题行 | v |
---|---|---|
tr + td 标签 | 单元格 | 7 |
class="r-vstack" | 纵向排列 | 18 |
class="r-hstack" | 横向排列 | 2 |
<pre><code class="javascript" data-trim data-line-numbers> print('hello'); print('world'); </code></pre>
直接写 Markdown即可
参考 docs
<section data-markdown> ## 支持 Markdown 直接写 Markdown即可 参考 [docs](https://revealjs.com/markdown/). </section>
例如: 这个.
<h2 class="r-fit-text">FIT TEXT</h2>
class="r-stretch" 纵向尽量大(每页只能一个)
class="r-frame" 在图片外框加个圈,使其更显眼
import React, { useState } from 'react'; function Example() { const [count, setCount] = useState(0); return ( ... ); }
使用data-line-numbers="|4,8-11|17|22-24",以及 script type="text/template" 标记 来实现动态代码
import React, { useState } from 'react'; function Example() { const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> <button onClick={() => setCount(count + 1)}> Click me </button> </div> ); } function SecondExample() { const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> <button onClick={() => setCount(count + 1)}> Click me </button> </div> ); }
import React, { useState } from 'react'; function Example() { const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> <button onClick={() => setCount(count + 1)}> Click me </button> </div> ); } function SecondExample() { const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> <button onClick={() => setCount(count + 1)}> Click me </button> </div> ); }
import React, { useState } from 'react'; function Example() { const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> <button onClick={() => setCount(count + 1)}> Click me </button> </div> ); } function SecondExample() { const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> <button onClick={() => setCount(count + 1)}> Click me </button> </div> ); }
import React, { useState } from 'react'; function Example() { const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> <button onClick={() => setCount(count + 1)}> Click me </button> </div> ); } function SecondExample() { const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> <button onClick={() => setCount(count + 1)}> Click me </button> </div> ); }
<section data-state="make-it-pop"></section>
可以用css来控制它
.make-it-pop { filter: drop-shadow(0 0 10px purple); }
也可以用 javascript,打开页面时触发
Reveal.on( 'make-it-pop', () => { console.log('✨'); });
使用 class="fragment"
可以实现
“一步一步显示” 的效果
参考官方文档还可以设置 Fragments 的特效:
grow
shrink
fade-out
fade-right, up, down, left
fade-in-then-out
fade-in-then-semi-out
Highlight red blue green
有一些主题可以选择
Black (default) -
White -
League -
Sky -
Beige -
Simple
Serif -
Blood -
Night -
Moon -
Solarized
<section data-background="#dddddd">
⬇️
<section data-background-gradient=
"linear-gradient(to bottom, #ddd, #191919)">
<section data-background="image.png">
<section data-background="image.png"
data-background-repeat="repeat"
data-background-size="100px">
<section data-background-video="video.mp4,video.webm">
以 "zoom" 的方式切换背景,也可以是 slide 等
data-background-transition="zoom"
或者
Reveal.configure({ backgroundTransition: 'zoom' })
可以把网页设置为背景
<section data-background-iframe=
"guofei.site/" data-background-interactive>