mirror of
https://github.com/blasten/turn.js.git
synced 2025-04-06 03:57:41 +08:00
52 lines
981 B
Markdown
Executable File
52 lines
981 B
Markdown
Executable File
turn.js
|
|
=========
|
|
|
|
### The awesome paper-like effect made for 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.
|
|
|
|
|
|
#### Example
|
|
|
|
**CSS code:**
|
|
<pre>
|
|
#magazine{
|
|
width:800px;
|
|
height:400px;
|
|
}
|
|
#magazine .turn-page{
|
|
width:400px;
|
|
height:400px;
|
|
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({page: 1, shadows: true, acceleration: true});
|
|
</pre>
|
|
|
|
#### Requeriments
|
|
|
|
jQuery 1.7 or later
|
|
|
|
|
|
[Full documentation on turnjs.com/#reference](http://www.turnjs.com/#reference)
|
|
|
|
* * *
|
|
|
|
turn.js is licensed under MIT license.
|
|
|
|
[turnjs.com](http://www.turnjs.com/)
|