OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <style> | |
4 body { | |
5 margin: 0; | |
6 min-height: 1000px; | |
7 } | |
8 #test { | |
9 width: 100px; | |
10 height: 100px; | |
11 } | |
12 @media all and (device-width:700px) | |
13 { | |
14 #test { width: 300px; } | |
15 } | |
16 @media all and (max-device-width:699px) | |
17 { | |
18 #test { width: 200px; } | |
19 } | |
20 @media all and (min-device-width:701px) | |
21 { | |
22 #test { width: 400px; } | |
23 } | |
24 @media all and (device-height:500px) | |
25 { | |
26 #test { height: 300px; } | |
27 } | |
28 @media all and (max-device-height:499px) | |
29 { | |
30 #test { height: 200px; } | |
31 } | |
32 @media all and (min-device-height:501px) | |
33 { | |
34 #test { height: 400px; } | |
35 } | |
36 </style> | |
37 | |
38 <script> | |
39 function dumpSize() | |
40 { | |
41 var div = document.querySelector("#test"); | |
42 return div.offsetWidth + "x" + div.offsetHeight; | |
43 } | |
44 </script> | |
45 </head> | |
46 <body> | |
47 <div id="test"></div> | |
48 </body> | |
49 </html> | |
OLD | NEW |