Skip to content
Newer
Older
100644 48 lines (48 sloc) 2.04 KB
97ffdaa @andreasbovens Added extra device-pixel-ratio examples
authored Jul 11, 2012
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>&lt;meta name="viewport" content="width=device-width"&gt; with device-pixel-ratio media query (2.25)</title>
6 <meta name="viewport" content="width=device-width">
7 <link href='http://fonts.googleapis.com/css?family=Terminal+Dosis:200,400,700' rel='stylesheet' type='text/css'>
8 <link href="style.css" rel="stylesheet" type="text/css">
9 <style>
10 @media (-o-min-device-pixel-ratio: 9/4),
11 (-webkit-min-device-pixel-ratio: 2.25),
12 (min--moz-device-pixel-ratio: 2.25),
13 (min-resolution: 2.25dppx) {
14 body {background-size: 1000px;}
15 }
16 </style>
17 <script src="report.js"></script>
18 <script>
19 function init() {
20 var article = document.getElementById('article');
21 var top = document.getElementById('top');
22 top.addEventListener('click', function () {
23 article.classList.toggle('fold');
24 }, false);
25 }
26 window.addEventListener('load', init, false);
27 </script>
28 </head>
29 <body>
30 <article id="article">
31 <h1 id="top">viewport setting</h1>
32 <pre><code>&lt;meta name="viewport" content="width=device-width"&gt;
33 +
34 @media (-o-min-device-pixel-ratio: 9/4),
35 (-webkit-min-device-pixel-ratio: 2.25),
36 (min--moz-device-pixel-ratio: 2.25),
37 (min-resolution: 2.25dppx) {
38 body {background-size: 1000px;}
39 }
40 </code></pre>
41 <h1>reported values</h1>
42 <output></output>
43 <h1>lorem ipsum</h1>
44 <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non elit non enim consectetur iaculis ut ac mi. Sed adipiscing nulla id ipsum placerat congue. Quisque nec diam eget libero convallis iaculis. Nam feugiat purus id diam placerat suscipit. Cras nec tincidunt leo. Integer tincidunt porttitor enim, et elementum augue pellentesque id. Quisque leo velit, tincidunt in pretium in, cursus eu elit. Etiam vitae lacus ligula.</p>
45 <p>Quisque nec diam eget libero convallis iaculis. Nam feugiat purus id diam placerat suscipit. Cras nec tincidunt leo. Integer tincidunt porttitor enim, et elementum augue pellentesque id. Quisque leo velit, tincidunt in pretium in, cursus eu elit. Etiam vitae lacus ligula.</p>
46 </article>
47 </body>
48 </html>
Something went wrong with that request. Please try again.