Method: center: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Centers the flipbook depending on how many pages are visible. The center method changes the CSS <tt>margin-left</tt> property of <tt>#flipbook</tt> as way to center the flipbook. Therefore, if you need to change the <tt>margin-left</tt> of the flipbook, it's recommend to insert the flipbook in a container to use its the margin properties. | Centers the flipbook depending on how many pages are visible. The center method changes the CSS <tt>margin-left</tt> property of <tt>#flipbook</tt> as way to center the flipbook. Therefore, if you need to change the <tt>margin-left</tt> of the flipbook, it's recommend to insert the flipbook in a container to use its the margin properties. | ||
If the flipbook has the option [[Option: autoCenter|autoCenter]] set to true, it might not be necessary to use this method. | |||
''This method does not have parameters.'' | {| class="wikitable" | ||
|- | |||
! | ''This method does not have parameters.'' | |||
|} | |||
Example: | Example: | ||
| Line 8: | Line 12: | ||
<pre class="javascript"> | <pre class="javascript"> | ||
$("#flipbook").turn("center"); | $("#flipbook").turn("center"); | ||
</pre> | |||
Adding a CSS transition when centering: | |||
<pre class="css"> | |||
#flipbook{ | |||
transition:margin-left 1s; | |||
-webkit-transition:margin-left 1s; | |||
-moz-transition:margin-left 1s; | |||
-o-transition:margin-left 1s; | |||
-ms-transition:margin-left 1s; | |||
transition:margin-left 1s; | |||
} | |||
</pre> | </pre> | ||
<yambe:breadcrumb>Turn Methods</yambe:breadcrumb> | <yambe:breadcrumb>Turn Methods</yambe:breadcrumb> | ||
Latest revision as of 16:07, 6 July 2012
Centers the flipbook depending on how many pages are visible. The center method changes the CSS margin-left property of #flipbook as way to center the flipbook. Therefore, if you need to change the margin-left of the flipbook, it's recommend to insert the flipbook in a container to use its the margin properties.
If the flipbook has the option autoCenter set to true, it might not be necessary to use this method.
| This method does not have parameters. |
|---|
Example:
$("#flipbook").turn("center");
Adding a CSS transition when centering:
#flipbook{
transition:margin-left 1s;
-webkit-transition:margin-left 1s;
-moz-transition:margin-left 1s;
-o-transition:margin-left 1s;
-ms-transition:margin-left 1s;
transition:margin-left 1s;
}
<yambe:breadcrumb>Turn Methods</yambe:breadcrumb>