-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
16 lines (16 loc) · 1.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><title>大屏可视化项目</title><script>const clientWidth = document.documentElement.clientWidth;
const clientHeight = document.documentElement.clientHeight;
// const pageWidth = clientWidth / clientHeight > 16 / 9 ? clientHeight * (16 / 9) : clientWidth;
window.pageWidth = clientWidth / clientHeight > 16 / 9 ? clientHeight * (16 / 9) : clientWidth;
const pageHeight = pageWidth / (16 / 9);
const string = `
<style>
html{
font-size: ${pageWidth / 100}px;
}
</style>
`;
document.write(string);</script><script defer="defer" type="module" src="js/chunk-vendors.97679599.js"></script><script defer="defer" type="module" src="js/app.f108641e.js"></script><link href="css/app.b9e44b30.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.5f052461.js" nomodule></script><script defer="defer" src="js/app-legacy.aa639148.js" nomodule></script></head><body><div id="app"></div><script>const app = document.querySelector('#app');
// app.style.width = pageWidth + 'px';
app.style.height = pageHeight + 'px';
app.style.marginTop = (clientHeight - pageHeight) / 2 + 'px';</script></body></html>