mirror of
https://github.com/blasten/turn.js.git
synced 2025-04-06 03:57:41 +08:00
48 lines
917 B
Markdown
Executable File
48 lines
917 B
Markdown
Executable File
turn.js
|
|
=========
|
|
|
|
### Make a flip book with HTML5
|
|
|
|
Turn.js is a plugin for jQuery that adds a beautiful transition similar to real pages in a book or magazine. It works in all modern browsers including touch devices
|
|
|
|
#### Usage
|
|
|
|
**CSS code:**
|
|
<pre>
|
|
#magazine{
|
|
width: 800px;
|
|
height: 400px;
|
|
}
|
|
#magazine .turn-page{
|
|
background-color:#ccc;
|
|
}
|
|
</pre>
|
|
|
|
**HTML code:**
|
|
<pre>
|
|
<div id=<span class="string">'magazine'</span>>
|
|
<div> <span class="text">Page 1</span> </div>
|
|
<div> <span class="text">Page 2</span> </div>
|
|
<div> <span class="text">Page 3</span> </div>
|
|
</div>
|
|
</pre>
|
|
|
|
**JavaScript code:**
|
|
<pre>
|
|
$('#magazine').turn({gradients: true, acceleration: true});
|
|
</pre>
|
|
|
|
#### Requeriments
|
|
|
|
jQuery 1.7 or later
|
|
|
|
|
|
|
|
[Full documentation](https://github.com/blasten/turn.js/wiki/Reference)
|
|
|
|
* * *
|
|
|
|
turn.js is licensed under MIT license.
|
|
|
|
[turnjs.com](http://www.turnjs.com/)
|