index.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <script>
  6. var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
  7. CSS.supports('top: constant(a)'))
  8. document.write(
  9. '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
  10. (coverSupport ? ', viewport-fit=cover' : '') + '" />')
  11. </script>
  12. <title></title>
  13. <!--preload-links-->
  14. <!--app-context-->
  15. <style>
  16. /* 防止Safari下拉刷新 */
  17. @media screen and (pointer: coarse) {
  18. @supports (-webkit-backdrop-filter: blur(1px)) and (overscroll-behavior-y: none) {
  19. html {
  20. min-height: 100.3%;
  21. overscroll-behavior-y: none;
  22. }
  23. }
  24. }
  25. /* 防止Chrome下拉刷新 */
  26. body {
  27. overscroll-behavior-y: none;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <div id="app"><!--app-html--></div>
  33. <script type="module" src="/main.js">
  34. // // 检测浏览器是否支持overscroll-behavior属性
  35. // if (!'overscrollBehavior' in document.documentElement.style) {
  36. // document.addEventListener('touchmove', function(event) {
  37. // event.preventDefault();
  38. // }, {
  39. // passive: false
  40. // });
  41. // }
  42. </script>
  43. </body>
  44. </html>