temp2.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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, user-scalable=no" >
  6. <title>yyyy</title>
  7. </head>
  8. <body>
  9. <style>
  10. .promptBox {
  11. position: fixed;
  12. top: 0;
  13. left: 0;
  14. right: 0;
  15. bottom: 0;
  16. background-color: rgba(0,0,0,.3);
  17. display: -webkit-box;
  18. display: -ms-flexbox;
  19. display: flex;
  20. }
  21. .promptBox .wrap {
  22. margin: auto;
  23. background-color: #fff;
  24. width: 6.6rem;
  25. text-align: center;
  26. padding-bottom: .3rem;
  27. border-radius: .08rem;
  28. overflow: hidden;
  29. }
  30. .p-weak-subscribe {
  31. position: relative;
  32. }
  33. .p-weak-subscribe .head.head {
  34. font-size: .36rem;
  35. color: #32a1ff;
  36. font-weight: 700;
  37. }
  38. .promptBox .head {
  39. height: 1rem;
  40. line-height: 1rem;
  41. font-size: .32rem;
  42. border-bottom: 1px solid #e5e5e5;
  43. }
  44. .promptBox .body {
  45. font-size: .32rem;
  46. padding: .3rem;
  47. }
  48. .p-weak-subscribe img {
  49. height: 4rem;
  50. width: 4rem;
  51. margin: .3rem auto;
  52. display: block;
  53. }
  54. </style>
  55. <div class="promptBox" style="">
  56. <div class="wrap">
  57. <div class="p-weak-subscribe">
  58. <div class="head">温馨提示</div>
  59. <div class="body">
  60. <p>关注作者授权公众号继续阅读</p>
  61. <p>更多精彩内容等你哟~</p>
  62. <div style="position: relative; height: auto;">
  63. <img src="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEC8TwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyZjJQTk5RMWFld2sxTUJNb05xY1UAAgQlo7BaAwQAjScA">
  64. </div>
  65. <p>长按上图识别二维码关注</p>
  66. </div>
  67. <div class="close"></div>
  68. </div>
  69. </div>
  70. </div>
  71. <script type="text/javascript">
  72. function refreshRem() {
  73. console.log(document.body.offsetWidth)
  74. document.documentElement.style.fontSize = ( Math.min( window.innerWidth,screen.width,document.body.offsetWidth ) / 750) * 100 + 'px';
  75. }
  76. window.addEventListener('resize', function () {
  77. clearTimeout(tid);
  78. tid = setTimeout(refreshRem, 300);
  79. }, false);
  80. window.addEventListener('pageshow', function (e) {
  81. if (e.persisted) {
  82. clearTimeout(tid);
  83. tid = setTimeout(refreshRem, 300);
  84. }
  85. }, false);
  86. var tid;
  87. refreshRem()</script>
  88. </body>
  89. </html>