mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-23 13:45:49 +00:00
added fixed attribute docs
This commit is contained in:
parent
2c09ec0885
commit
3ad1208f25
2 changed files with 3 additions and 2 deletions
|
|
@ -9,14 +9,14 @@
|
|||
|
||||
<div data-role="page">
|
||||
|
||||
<div data-role="header">
|
||||
<div data-role="header" data-position="fixed">
|
||||
<h1>Fixed toolbars</h1>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
<h2>Demo description</h2>
|
||||
<p>This is a demo of the "fixed" headers and footers used in the jQuery Mobile framework. The page content flows naturally, allowing us to take advantage of native scrolling instead of a scripting a faux-scrolling workaround. The header and footer divs are right in the flow of the document, but whenever they are out of view, you can tap the screen to make them appear. Tapping again or scrolling the page will cause them to appear back in the flow of the page (at the top and bottom). </p>
|
||||
<p>You can disable this behavior by setting the header and/or footer to <a href="bars-inline.html">"inline" toolbar mode</a>.</p>
|
||||
<p>To set this behavior on a header or footer, add the <code> data-position="fixed"</code> attribute to the toolbar container.</p>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
<p>A <a href="bars-fixed.html"><strong>"fixed" positioning mode</strong></a> provides the convenience of static toolbars without the drawbacks of implementing faux-scrolling in JavaScript. The toolbars start in their natural positions on the page, like the "inline" mode, but when a bar scrolls out of the viewport, the framework animates the bar back into view by dynamically re-positioning the bar to the top or bottom of the viewport.</p>
|
||||
<p> At any time, tapping the screen will toggle the visibility of the fixed toolbars: tapping the page when the toolbars aren't visible brings them into view, tapping again hides them until you tap again. This gives users the option to hide the toolbars until needed to maximize screen real estate. </p>
|
||||
<p>To set this behavior on a header or footer, add the <code> data-position="fixed"</code> attribute to the toolbar container.</p>
|
||||
|
||||
<p>A <a href="bars-fullscreen.html"><strong>"fullscreen" position mode</strong></a> works just like the fixed mode except that the toolbars aren't shown at the top and bottom of the page and only appear when the page is clicked. This is useful for immersive apps like photo or video viewers where you want the content to full when whole screen and toolbars can be summoned to appear by tapping the screen. Keep in mind that the toolbars in this mode will sit <strong>over</strong> page content so this is best used for specific situations.</p>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue