pc.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!DOCTYPE html>
  2. <html lang=zh-CN>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
  7. <title>太极券-PC端</title>
  8. <meta name="Copyright" content="helang">
  9. <link rel="shortcut icon" type="image/png" href="">
  10. <meta name="keywords" content="">
  11. <meta name="description" content="">
  12. <style type="text/css">
  13. body{
  14. margin: 0;
  15. background-color: #f3f3f3;
  16. }
  17. iframe{
  18. width: 375px;
  19. height: 667px;
  20. background-color: #fff;
  21. box-sizing: content-box;
  22. border: none;
  23. }
  24. @media screen and (min-width: 450px) {
  25. iframe {
  26. position: fixed;
  27. top: 0;
  28. right: 0;
  29. bottom: 0;
  30. left: 0;
  31. margin: auto;
  32. border: rgba(0,0,0,0.1) solid 1px;
  33. border-radius: 4px;
  34. }
  35. }
  36. </style>
  37. <script type="text/javascript">
  38. window.isPC = true;
  39. window.onload = function(){
  40. /* 监听电脑浏览器窗口尺寸改变 */
  41. window.onresize = function(){
  42. /* 窗口宽度 小于或等于420px 时,跳转回H5页面 */
  43. if(window.innerWidth <= 420){
  44. window.location.pathname = '/';
  45. }
  46. }
  47. }
  48. </script>
  49. </head>
  50. <body>
  51. <iframe src="/?type=1"></iframe>
  52. </body>
  53. </html>