Нет описания

index.html 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta content="yes" name="apple-mobile-web-app-capable">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0,user-scalable=0" />
  7. <title>分享领红包</title>
  8. <link rel="stylesheet" type="text/css" href="public/public_css.css"/>
  9. <style type="text/css">
  10. body{ min-height:100vh;}
  11. .banner{width: 3.025rem;height: 1.15rem;margin: auto;padding-top: 0.11rem;}
  12. .banner img{width: 100%;}
  13. .red_packet{/*width: 2.49rem;*/width: 2.52rem;margin: auto;}
  14. .red_packet .click{font-size:0.18rem;color:#FB3D38;text-align: center;padding-top: 0.2rem;padding-bottom: 0.2rem;}
  15. .red_packet .copy{width:0.94rem;height:0.26rem;margin:auto;color:#FFF;font-size:0.15rem;line-height: 0.26rem;text-align:center;background:#FB3D38;border-radius:0.075rem;box-shadow:0.02rem 0.045rem 0.05rem rgba(143,141,141,0.22);}
  16. .red_packet .con{width: 100%;font-size:0.14rem;color:#666666;padding-top: 0.2rem;padding-bottom: 0.345rem;}
  17. .already{height: 2rem;padding-left: 0.16rem;padding-right: 0.15rem;}
  18. .already .num{font-size:0.15rem;color:#FB3D38;padding-bottom: 0.175rem;}
  19. .already ul{height: 1.305rem;overflow-y: scroll;}
  20. .already ul li{float: left;padding-bottom: 0.08rem;color: #666666;line-height: 0.355rem;}
  21. .already ul li img{float: left;display: block;width: 0.355rem;}
  22. .already ul li .username{padding-left: 0.075rem;padding-right: 0.55rem; }
  23. .already ul li .ed{padding-right: 0.48rem;}
  24. .already ul li .username,.already ul li .ed{font-size: 0.14rem;}
  25. .already ul li .day,.already ul li .time{font-size: 0.12rem;}
  26. .already ul li .day{padding-right:0.08rem ;}
  27. .cooperation{width:2.54rem;height: 0.46rem;margin: auto;background: url(images/add.png) no-repeat 0.6rem 0.125rem,url(images/add.png) no-repeat 1.65rem 0.125rem; background-size:0.22rem 0.22rem ;}
  28. .cooperation img{float:left;width: 0.46rem;margin-right: 0.57rem;}
  29. .cooperation img:nth-child(3){margin-right: 0rem;}
  30. .bottom{margin: auto;color: #FB3D38;text-align: center;font-size: 0.14rem;}
  31. .bottom p:nth-child(1){padding-top: 0.185rem;padding-bottom: 0.205rem;font-size: 0.15rem;}
  32. #copy_1,#copy_2,#taokouling{position: absolute;left: -1000rem;}
  33. .alert-info {
  34. position: absolute;
  35. top: 1.74rem;
  36. right: 0;
  37. left: 0;
  38. bottom: 0;
  39. text-align: center;
  40. }
  41. .alert-info p {
  42. display: inline-block;
  43. /*height: 0.38rem;*/
  44. color: #fff;
  45. font-size: 0.14rem;
  46. line-height: 0.38rem;
  47. padding: 0 0.10rem;
  48. background-color: rgba(0, 0, 0, 0.7);
  49. border-radius: 5px;
  50. }
  51. </style>
  52. <script type="text/javascript">
  53. document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth/375) + "px";
  54. window.onresize = function(){
  55. document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth/375) + "px";
  56. }
  57. </script>
  58. </head>
  59. <body>
  60. <div class="banner">
  61. <img src="images/banner.png"/>
  62. </div>
  63. <div class="red_packet">
  64. <p class="click">点我领红包</p>
  65. <p class="copy" onclick="copyPassword()">领取红包</p>
  66. <p class="con">自动生成淘口令,打开手机淘宝领取红包</p>
  67. </div>
  68. <div class="already">
  69. <p class="num">已有999位用户领取红包</p>
  70. <ul>
  71. <li><img src="images/001.png" /><span class="username">小豆***</span><span class="ed">领取了红包</span><span class="day">05-30</span><span class="time">14:36</span></li>
  72. <li><img src="images/001.png" /><span class="username">小豆***</span><span class="ed">领取了红包</span><span class="day">05-30</span><span class="time">14:36</span></li>
  73. <li><img src="images/001.png" /><span class="username">小豆***</span><span class="ed">领取了红包</span><span class="day">05-30</span><span class="time">14:36</span></li>
  74. <li><img src="images/001.png" /><span class="username">小豆***</span><span class="ed">领取了红包</span><span class="day">05-30</span><span class="time">14:36</span></li>
  75. <li><img src="images/001.png" /><span class="username">小豆***</span><span class="ed">领取了红包</span><span class="day">05-30</span><span class="time">14:36</span></li>
  76. <li><img src="images/001.png" /><span class="username">小豆***</span><span class="ed">领取了红包</span><span class="day">05-30</span><span class="time">14:36</span></li>
  77. <li><img src="images/001.png" /><span class="username">小豆***</span><span class="ed">领取了红包</span><span class="day">05-30</span><span class="time">14:36</span></li>
  78. </ul>
  79. </div>
  80. <div class="cooperation">
  81. <img src="images/jinniu.png" alt="" />
  82. <img src="images/taobao.png" alt="" />
  83. <img src="images/liedou.png" alt="" />
  84. </div>
  85. <div class="bottom">
  86. <p>联合送礼</p>
  87. <p>下载猎豆优选,大额红包拿到手软</p>
  88. </div>
  89. <input id="copy_1" type="text" readOnly="true" value=""/>
  90. <div id="copy_2"></div>
  91. <text id="taokouling">€WVXSb1pT51S€</text>
  92. <div class="alert-info" style="display: none;">
  93. <!-- tip提示,3s后消失 -->
  94. <p></p>
  95. </div>
  96. </body>
  97. </html>
  98. <script type="text/javascript" src="public/jquery-2.1.0.js"></script>
  99. <script type="text/javascript">
  100. function copyPassword() {
  101. var data=document.getElementById("taokouling").innerHTML;
  102. copy_2.innerHTML = data;
  103. copy_1.value = data;
  104. if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
  105. //区分iPhone设备
  106. window.getSelection().removeAllRanges();//这段代码必须放在前面否则无效
  107. var Url2=document.getElementById("copy_2");//要复制文字的节点
  108. var range = document.createRange();
  109. // 选中需要复制的节点
  110. range.selectNode(Url2);
  111. // 执行选中元素
  112. window.getSelection().addRange(range);
  113. // 执行 copy 操作
  114. var successful = document.execCommand('copy');
  115. // 移除选中的元素
  116. window.getSelection().removeAllRanges();
  117. }else{
  118. var Url2=document.getElementById("copy_1");//要复制文字的节点
  119. Url2.select(); // 选择对象
  120. document.execCommand("Copy"); // 执行浏览器复制命令
  121. }
  122. window.location.href="Invitation.html"
  123. }
  124. </script>