-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
83 lines (80 loc) · 3.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="zh" dir="ltr">
<head>
<meta charset=utf-8>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>PPI计算器</title>
<meta property="og:title" content="PPI计算器 (PWA)" />
<meta name="keywords" content="PPI, 像素密度, 分辨率, 缩放, HiDPI, 高分屏, PWA">
<meta name="description" property="og:description" content="一个更加智能的PPI计算器。自动获取屏幕分辨率,输入屏幕尺寸即可计算像素密度并提供高分屏缩放比例建议,支持PWA离线运行">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- the icon is made by Freepik -->
<!-- https://www.flaticon.com/authors/freepik -->
<link rel="apple-touch-icon" sizes="180x180" href="logo-180x180.png">
<link rel="icon" type="image/png" sizes="32x32" href="logo-16x16.png">
<link rel="icon" type="image/png" sizes="16x16" href="logo-16x16.png">
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="style.css">
<script src="ppi-calc.js" async></script>
</head>
<body>
<header><a href="https://github.com/feeshy/ppi-calc" target="_blank">source code</a></header>
<section id="input">
<p>
<span>屏幕宽度:</span>
<span><input id="pixelW" type="number" min="0" step="1" value=""> 像素</span>
<span id="cmW"></span>
</p>
<p>
<span>屏幕高度:</span>
<span><input id="pixelH" type="number" min="0" step="1" value=""> 像素</span>
<span id="cmH"></span>
</p>
<p>
<span>对角长度:</span>
<span><input id="inchD" type="number" min="0" step="0.1" value=""> 英寸</span>
<span id="cmD"></span>
</p>
<p><input type="checkbox" id="isPenTile">PenTile 排列</p>
</section>
<section id="result" style="display:none;">
<hr>
<p style="text-align:center; font-size:larger"><b id="ppi"></b><span id="tooLow"></span></p>
<section id="recommend" style="display:none;">
<p>系统缩放建议<p>
<div class="wrapper">
<table>
<tr>
<th></th>
<th class="thisDevice" style="display:none;">当前</th>
<th>更大字号</th>
<th>更多内容</th>
</tr>
<tr>
<td>缩放比例</td>
<td id="scaleFac" class="thisDevice" style="display:none;">___%</td>
<td id="scaleFacLgr">___%</td>
<td id="scaleFacMore">___%</td>
</tr>
<tr>
<td style="font-size:0.8em;">CSS分辨率</td>
<td id="res" class="thisDevice" style="display:none;">____×____</td>
<td id="resLgr">____×____</td>
<td id="resMore">____×____</td>
</tr>
</table>
</div>
</section>
</section>
<section class="thisDevice" style="display:none;">
<section id="officeScale" style="display: none;">
<p>Office缩放建议</p>
<div class="wrapper">
<img src="officeScale.png" width="260" loading="lazy" alt="screenshot">
</div>
<p>当前系统缩放比例下,将MS Office右下角的缩放比设置为<span id="officeScaleFac">___%</span>,即可使屏幕上的文稿显示为与打印文稿相同的尺寸</p>
</section>
</section>
</body>
</html>