index.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport"
  7. content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no,viewport-fit=cover">
  8. <meta name="format-detection" content="telephone=no,email=no">
  9. <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
  10. <meta http-equiv="Pragma" content="no-cache" />
  11. <meta http-equiv="Expires" content="0" />
  12. <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  13. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pannellum@2.5.6/build/pannellum.css">
  14. <title></title>
  15. </head>
  16. <body>
  17. <noscript>
  18. <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
  19. Please enable it to continue.</strong>
  20. </noscript>
  21. <script src="https://cdn.jsdelivr.net/npm/pannellum@2.5.6/build/pannellum.js"></script>
  22. <div id="app"></div>
  23. <!-- built files will be auto injected -->
  24. </body>
  25. <script>
  26. // 事件监听
  27. document.addEventListener('DOMContentLoaded', resetRem)
  28. window.onresize = resetRem
  29. /**
  30. * [resetRem 重置Rem数值]
  31. */
  32. function resetRem () {
  33. let documentCtx = document.documentElement
  34. documentCtx.style.fontSize = documentCtx.clientWidth / 10 + 'px'
  35. }
  36. </script>
  37. </html>