1 Star 0 Fork 47

chenyijun0119 / DM_screen_web

forked from yuanjinwie / DM_screen_web 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.html 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<script>
!(function (x) {
function w() {
var v,
u,
t,
tes,
s = x.document,
r = s.documentElement,
a = document.children[0].clientWidth;
if (a === 0) {
a = x.innerWidth;
}
if (!v && !u) {
var n = !!x.navigator.appVersion.match(/AppleWebKit.*Mobile.*/);
v = x.devicePixelRatio;
tes = x.devicePixelRatio;
v = n ? v : 1;
u = 1 / v;
}
if (!a || a <= 0) {
return;
}
if (a > 980) {
r.style.fontSize = '16px';
} else if (a >= 375 && a <= 980) {
r.style.fontSize = (a / 1920) * 32 + 'px';
} else {
r.style.fontSize = '6.25px';
}
}
x.addEventListener('resize', function () {
w();
});
w();
})(window);
</script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenyijun0119/DM_screen_web.git
git@gitee.com:chenyijun0119/DM_screen_web.git
chenyijun0119
DM_screen_web
DM_screen_web
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891