OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 body { | 4 body { |
5 margin: 0; | 5 margin: 0; |
6 min-height: 1000px; | 6 min-height: 1000px; |
7 } | 7 } |
8 #test { | 8 #test { |
9 width: 100px; | 9 width: 100px; |
10 height: 100px; | 10 height: 100px; |
(...skipping 15 matching lines...) Expand all Loading... |
26 #test { height: 300px; } | 26 #test { height: 300px; } |
27 } | 27 } |
28 @media all and (max-device-height:499px) | 28 @media all and (max-device-height:499px) |
29 { | 29 { |
30 #test { height: 200px; } | 30 #test { height: 200px; } |
31 } | 31 } |
32 @media all and (min-device-height:501px) | 32 @media all and (min-device-height:501px) |
33 { | 33 { |
34 #test { height: 400px; } | 34 #test { height: 400px; } |
35 } | 35 } |
| 36 #pointer { |
| 37 width: 10px; |
| 38 height: 10px; |
| 39 } |
| 40 @media all and (pointer: coarse) |
| 41 { |
| 42 #pointer { height: 20px; } |
| 43 } |
| 44 @media all and (hover: on-demand) |
| 45 { |
| 46 #pointer { width: 20px; } |
| 47 } |
36 </style> | 48 </style> |
37 | 49 |
38 <script> | 50 <script> |
39 function dumpSize() | 51 function dumpSize(id) |
40 { | 52 { |
41 var div = document.querySelector("#test"); | 53 var div = document.querySelector("#" + id); |
42 return div.offsetWidth + "x" + div.offsetHeight; | 54 return div.offsetWidth + "x" + div.offsetHeight; |
43 } | 55 } |
44 </script> | 56 </script> |
45 </head> | 57 </head> |
46 <body> | 58 <body> |
47 <div id="test"></div> | 59 <div id="test"></div> |
| 60 <div id="pointer"></div> |
48 </body> | 61 </body> |
49 </html> | 62 </html> |
OLD | NEW |