JSFiddle - React, Tailwind, and code Playground
by ds345
HTML
<div data-role="page" class="jqm-demos ui-responsive-panel" id="panel-fixed-page1">
<div data-role="header" data-theme="f" data-position="fixed">
<h1>Fixed header</h1>
<a href="#nav-panel" data-icon="bars" data-iconpos="notext">Menu</a>
<a href="#add-form" data-icon="gear" data-iconpos="notext">Add</a>
</div><!-- /header -->
<div data-role="content" class="jqm-content">
<h1>Panels</h1>
<h2>Fixed positioning</h2>
<p>This is a typical page that has two buttons in the header bar that open panels. The left panel has the reveal display mode. The right panel opens as overlay. For both panels we set <code>data-position-fixed="true"</code>. We also set position fixed for the header and footer on this page.</p>
<p>The left panel contains a long menu to demonstrate that the framework will check the panel contents height and unfixes the panel so its content can be scrolled. In the right panel there is a short form that shows the fixed positioning.</p>
<h2>Responsive</h2>
<p>To make this responsive, you can make the page re-flow at wider widths. This allows both the reveal panel menu and page to be used together when more space is available. This behavior is controlled by CSS media queries. You can create a custom one for a specific breakpoint or use the breakpoint preset by adding the <code>class="ui-responsive-panel"</code> to the page container. We have added this class on this demo page.</p>
<a href="./" class="jqm-button" data-ajax="false" data-role="button" data-mini="true" data-inline="true" data-icon="arrow-l" data-iconpos="left">Back to Panels</a>
<div data-demo-html="#panel-fixed-page1" data-demo-css="true"></div><!--/demo-html -->
</div><!-- /content -->
<div data-role="footer" data-position="fixed" data-theme="f">
<h4>Fixed footer</h4>
</div><!-- /footer -->
<div data-role="panel" data-position-fixed="true" data-theme="a" id="nav-panel">
<ul...
CSS
.nav-search .ui-btn-up-a {
background-image: none;
background-color: #333;
}
.nav-search .ui-btn-inner {
border-top: 1px solid #888;
border-color: rgba(255, 255, 255, .1);
}
.nav-search .ui-btn.ui-first-child {
border-top-width: 0;
background: #111;
}
.userform {
padding: .8em 1.2em;
}
.userform h2 {
color: #555;
margin: 0.3em 0 .8em 0;
padding-bottom: .5em;
border-bottom: 1px solid rgba(0,0,0,.1);
}
.userform label {
display: block;
margin-top: 1.2em;
}
.ui-grid-a {
margin-top: 1em;
padding-top: .8em;
margin-top: 1.4em;
border-top: 1px solid rgba(0,0,0,.1);
}