mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-28 20:52:21 +01:00
parent
0dc26b2e07
commit
f2d37ccc23
@ -5,7 +5,7 @@
|
||||
<li><a href="#overview-mobile">Mobile first</a></li>
|
||||
<li><a href="#overview-responsive-images">Responsive images</a></li>
|
||||
<li><a href="#overview-type-links">Typography and links</a></li>
|
||||
<li><a href="#overview-normalize">Normalize</a></li>
|
||||
<li><a href="#overview-normalize">Normalize.css</a></li>
|
||||
<li><a href="#overview-container">Containers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -26,11 +26,11 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
|
||||
<p>With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, <strong>Bootstrap is mobile first</strong>. Mobile first styles can be found throughout the entire library instead of in separate files.</p>
|
||||
<p>To ensure proper rendering and touch zooming, <strong>add the viewport meta tag</strong> to your <code><head></code>.</p>
|
||||
{% highlight html %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{% endhighlight %}
|
||||
<p>You can disable zooming capabilities on mobile devices by adding <code>user-scalable=no</code> to the viewport meta tag. This disables zooming, meaning users are only able to scroll, and results in your site feeling a bit more like a native application. Overall, we don't recommend this on every site, so use caution!</p>
|
||||
{% highlight html %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="overview-responsive-images">Responsive images</h3>
|
||||
|
@ -77,7 +77,7 @@
|
||||
</div>
|
||||
|
||||
<h3>What changes</h3>
|
||||
<p>Note the lack of the <code><meta name="viewport" content="width=device-width, initial-scale=1.0"></code>, which disables the zooming aspect of sites in mobile devices. In addition, we reset our container's width and are basically good to go.</p>
|
||||
<p>Note the lack of the <code><meta name="viewport" content="width=device-width, initial-scale=1"></code>, which disables the zooming aspect of sites in mobile devices. In addition, we reset our container's width and are basically good to go.</p>
|
||||
|
||||
<h3>Regarding navbars</h3>
|
||||
<p>As a heads up, the navbar component is rather tricky here in that the styles for displaying it are rather specific and detailed. Overrides to ensure desktop styles display are not as performant or sleek as one would like. Just be aware there may be potential gotchas as you build on top of this example when using the navbar.</p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user