How to implement fixed toolbar html css js on iphone page, fixed toolbar data-position=fixed

CSS position: fixed in browser support (most desktop browsers, iOS5+, Android 2.2+, BlackBerry 6, and others). Toolbars will be fixed to the top or bottom of the view using the "Fixed Toolbar" plugin. When the page scrolls freely, the fixed bar will always float at the top or bottom of the screen. In browsers that do not support fixed positioning, the toolbar will stay in that fixed position (top or bottom of the page).

To set this behavior for the header or bottom bar, add the data-position="fixed" attribute to the toolbar's container.

Page Title

html, body { padding: 0; margin: 0; }

.ui-content{

padding:10px 15px 0px 15px;

}

Fixed Header

photo-run.jpeg

This page demonstrates the "fixed" toolbar mode.

To enable this toolbar feature type, you apply the data-position="fixed" attribute to both the header and footer div elements.

Fixed Footer

2a17c924d7f11e3db944c99bfe4e9550.png

start browsing

e5484a2a51be276747324dc93bd00935.png

scroll to bottom

fullscreen data-fullscreen="true"

When starting to browse content, a full-screen fixed toolbar is displayed at the top of the content. But when the screen is tapped, the toolbar disappears completely from the screen. When you click the screen again, the toolbar is displayed. The full screen toolbar is ideal for a more immersive interface, like a picture viewer that is full screen and the photos themselves aren't distracting.

To set this behavior for the header or bottom bar, add the data-fullscreen="true" attribute to the toolbar's container.

Fixed Header!

49f05b61254e761bb5c5c34cdc1e3f69.png

start browsing

fd7c76fb5c2d4e0b4d81f2bf2cf04992.png

scroll to bottom

cd6798034b98f9fdb4204cd21e1c0917.png

Click the screen to close the toolbar

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324174669&siteId=291194637