reveal.js
结构
嵌套的section
标签表示结构:
<section> <section> <h2>1-1 aaa</h2> </section> <section> <h2>1-2 aaa</h2> </section> <section> <h2>1-3 aaa</h2> </section> </section> <section> <section> <h2>2-1 aaa</h2> </section> <section> <h2>2-2 aaa</h2> </section> <section> <h2>2-3 aaa</h2> </section> </section>
Markdown支持
用Markdown定义一页的内容:
<section data-markdown> <script type="text/template"> ## Markdown support sub page 1 For those of you who like that sort of thing. Instructions and a bit more info available [here](https://github.com/hakimel/reveal.js#markdown). </script> </section>
在Markdown标记后面加上注释来定义属性:
<!-- .element: class="fragment" data-fragment-index="1" -->
动画
css类型fragment
表示元素是动画出现,data-fragment-index
表示在第几帧出现。
例,在使用markdown标记时:
<section data-markdown> <script type="text/template"> ## Point 0 <!-- .element: class="fragment" data-fragment-index="0" --> ## Point 1 <!-- .element: class="fragment" data-fragment-index="1" --> ## Point 2 <!-- .element: class="fragment" data-fragment-index="2" --> </script> </section>
代码高亮
``` trait UserAuthentication { def authentication() } trait SASLAuthentication extends UserAuthentication { def authentication() { /* main auth logic */ } } trait AuthLogger extends UserAuthentication { def authentication() { prinln("before authentication") super.authentication() prinln("before authentication") } } object DefaultAuthextends SASLAuthentication with AuthLogger ```
例子
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>reveal.js - The HTML Presentation Framework</title> <meta name="description" content="A framework for easily creating beautiful presentations using HTML"> <meta name="author" content="Hakim El Hattab"> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <link rel="stylesheet" href="../../vimwiki-theme/3rd-libs/reveal.js/css/reveal.min.css"> <link rel="stylesheet" href="../../vimwiki-theme/3rd-libs/reveal.js/css/theme/simple.css" id="theme"> <link rel="stylesheet" href="../../vimwiki-theme/3rd-libs/reveal.js/lib/css/zenburn.css"> </head> <body> <div class="reveal"> <div class="slides"> <section> <h2>Intergalactic Interconnections</h2> <p> You can link between slides internally, <a href="#/2/3">like this</a>. </p> </section> </div> </div> <script src="../../vimwiki-theme/3rd-libs/reveal.js/lib/js/head.min.js"></script> <script src="../../vimwiki-theme/3rd-libs/reveal.js/js/reveal.min.js"></script> <script> // Full list of configuration options available here: // https://github.com/hakimel/reveal.js#configuration Reveal.initialize({ controls: true, progress: true, history: true, center: true, theme: Reveal.getQueryHash().theme, transition: Reveal.getQueryHash().transition || 'default', dependencies: [ { src: '../../vimwiki-theme/3rd-libs/reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } }, { src: '../../vimwiki-theme/3rd-libs/reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: '../../vimwiki-theme/3rd-libs/reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: '../../vimwiki-theme/3rd-libs/reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, { src: '../../vimwiki-theme/3rd-libs/reveal.js/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }, { src: '../../vimwiki-theme/3rd-libs/reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } } ] }); </script> </body> </html>