mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-31 21:20:23 +00:00
Merge pull request #2780 from MauriceG/patch-13
docs: some corrections at Pages & Dialogs / Anatomy of a Page
This commit is contained in:
commit
efe1896b93
1 changed files with 4 additions and 4 deletions
|
|
@ -50,11 +50,11 @@
|
|||
</code></pre>
|
||||
|
||||
<h2>Viewport meta tag</h2>
|
||||
<p>Note above that there is a meta <code>viewport</code> tag in the <code>head</code> to specify how the browser should display the page zoom level and dimensions. If this isn't set, many mobile browsers will use a "virtual" page width around 900 pixels to make it work well with exisitng desktop sites but the screens may look zoomed out and too wide. By setting the viewport attributes to <code>content="width=device-width, initial-scale=1</code>, the width will be set to the pixel width of the device screen. </p>
|
||||
<p>Note above that there is a meta <code>viewport</code> tag in the <code>head</code> to specify how the browser should display the page zoom level and dimensions. If this isn't set, many mobile browsers will use a "virtual" page width around 900 pixels to make it work well with exisitng desktop sites but the screens may look zoomed out and too wide. By setting the viewport attributes to <code>content="width=device-width, initial-scale=1"</code>, the width will be set to the pixel width of the device screen. </p>
|
||||
|
||||
<pre><code><meta name="viewport" content="width=device-width, initial-scale=1"> </code></pre>
|
||||
|
||||
<p>These settings do not disable the user's ability to zoom the pages which is nice from an accessibility perspective. There is a minor issue in iOS that doesn't properly set the width when changing orientations with these viewport settings, but this will hopefully be fixed a a future release. You can set other viewport values to disable zooming if required since this is part of your page content, not the library. </p>
|
||||
<p>These settings do not disable the user's ability to zoom the pages, which is nice from an accessibility perspective. There is a minor issue in iOS that doesn't properly set the width when changing orientations with these viewport settings, but this will hopefully be fixed a a future release. You can set other viewport values to disable zooming if required since this is part of your page content, not the library. </p>
|
||||
|
||||
<h2>Inside the body: Pages</h2>
|
||||
<p>Inside the <code><body></code> tag, each view or "page" on the mobile device is identified with an element (usually a <code>div</code>) with the <code> data-role="page"</code> attribute:</p>
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
<h2>Putting it together: Basic single page template</h2>
|
||||
|
||||
<p>Putting it all together, this is the standard boilerplate page template you should start with on a project. :</p>
|
||||
<p>Putting it all together, this is the standard boilerplate page template you should start with on a project: </p>
|
||||
|
||||
<pre><code>
|
||||
<!DOCTYPE html>
|
||||
|
|
@ -153,7 +153,7 @@
|
|||
</div><!-- /header -->
|
||||
|
||||
<div data-role="content">
|
||||
<p>I'm first in the source order so I'm shown as the page.</p>
|
||||
<p>I'm the second in the source order so I'm hidden when the page load. I'm just shown, if a link that reference my ID is beeing clicked.</p>
|
||||
<p><a href="#foo">Back to foo</a></p>
|
||||
</div><!-- /content -->
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue