index.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <link rel="shortcut icon " type="images/x-icon" href="./favicon.ico" />
  6. <meta
  7. name="viewport"
  8. content="width=device-width, initial-scale=1.0,user-scalable=no"
  9. />
  10. <title>中国中车--成都7号线虚拟仿真教学系统</title>
  11. <script>
  12. (function setRootFont() {
  13. var _self = window;
  14. _self.selfFontSize = undefined;
  15. _self.width = 1120; //设置默认最大宽度
  16. _self.fontSize = 100; //默认字体大小
  17. _self.widthProportion = function () {
  18. var clientWidth =
  19. document.documentElement.clientWidth > 1120
  20. ? 1120
  21. : document.documentElement.clientWidth;
  22. var p = clientWidth / _self.width;
  23. return p;
  24. };
  25. _self.changePage = function () {
  26. var w = _self.widthProportion();
  27. _self.selfFontSize = w * _self.fontSize;
  28. document
  29. .getElementsByTagName("html")[0]
  30. .setAttribute("style", "font-size:" + _self.selfFontSize + "px");
  31. };
  32. _self.changePage();
  33. window.addEventListener(
  34. "resize",
  35. function () {
  36. _self.changePage();
  37. },
  38. false
  39. );
  40. })();
  41. </script>
  42. <script type="module" crossorigin src="./assets/index-700f8bec.js"></script>
  43. <link rel="modulepreload" crossorigin href="./assets/main-4801cc52.js">
  44. <link rel="stylesheet" href="./assets/main-f8bd3d55.css">
  45. </head>
  46. <body>
  47. <div id="app"></div>
  48. </body>
  49. </html>