接口格式

This commit is contained in:
2022-07-13 14:21:40 +08:00
parent ae871a642f
commit 9332d9304a
8 changed files with 187 additions and 105 deletions

View File

@@ -8,3 +8,18 @@
<div id="app"></div>
</body>
</html>
<script>
(function (doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px';
};
if (!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
</script>