|
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DeviceSupport.aspx.cs" Inherits="HTML5Samples.NavigateTo.DeviceSupport" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<nav class="breadcrumb">
<a></a> ->
<a href="TableOfContents.aspx" rel="up">Table of Contents</a> ->
<a>Device Support</a>
</nav>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>
Device Support
</h2>
<h4>Key to Mobile page optimization</h4>
<p>
<ul>
<li>Viewport Meta Tag - Controls browsers page display <a class="toggleNextElement">[...]</a>
<ul class="toggleMeNoMargin">
<li><code>width</code></li>
<li><code>height</code></li>
<li><code>initial-scale</code></li>
<li><code>minimum-scale</code></li>
<li><code>maximum-scale</code></li>
<li><code>user-scalable</code></li>
<li>Sample :
<pre class="code">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=yes"/>
</pre>
</li>
</ul>
</li>
<li>CSS Media Queries - Media based style <a class="toggleNextElement">[...]</a>
<ul class="toggleMeNoMargin">
<li>External stylesheet :
<pre class="code">
<link rel="stylesheet" media="handheld, only screen and (max-device-width: 320px)" href="phone.css">
<link rel="stylesheet" media="only screen and (min-width: 641px) and (max-width: 800px)" href="ipad.css">
</pre>
</li>
<li>Within the <style> element (or in css file) as a media rule:
<pre class="code">
<style>
@media only screen and (max-width: 480px){
/* rules defined inside here are only applied to browsers that support CSS media queries and the browser window is 480px or smaller */
}
</style>
</pre>
</li>
<li>Imported stylesheet within the <code><style></code> element:
<pre class="code">
@import "smallscreen.css" only screen and (max-width: 480px);
</pre>
</li>
</ul>
</li>
</ul>
</p>
</asp:Content>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.