index.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
  6. <title>24点</title>
  7. <style>
  8. html,
  9. body {
  10. height: 100%;
  11. width: 100%;
  12. }
  13. .el-select-dropdown__item.selected {
  14. color: rgb(81, 201, 154) !important;
  15. }
  16. </style>
  17. </head>
  18. <body>
  19. <div id="app"></div>
  20. <!-- built files will be auto injected -->
  21. <script>
  22. let htmlwidth = document.documentElement.clientWidth || document.body.clientWidth
  23. let htmlDom = document.getElementsByTagName('html')[0];
  24. if (htmlwidth > 750) {
  25. htmlwidth = 750
  26. }
  27. htmlDom.style.fontSize = htmlwidth / 20 + 'px';
  28. window.onresize = function() {
  29. let htmlwidth = document.documentElement.clientWidth || document.body.clientWidth
  30. let htmlDom = document.getElementsByTagName('html')[0];
  31. if (htmlwidth > 750) {
  32. htmlwidth = 750
  33. }
  34. htmlDom.style.fontSize = htmlwidth / 20 + 'px';
  35. };
  36. </script>
  37. </body>
  38. </html>