Keine Beschreibung

index.html 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. <link rel="stylesheet" type="text/css" href="public.css"/>
  8. <title>6.18粉丝狂欢节</title>
  9. <style type="text/css">
  10. body{
  11. background:linear-gradient(90deg,#FF9000,#FF5000);
  12. }
  13. .body{
  14. width: 100%;
  15. background: url(img/bgImg.png) no-repeat;
  16. background-size: 100% 100%;
  17. padding-top: 1.62rem;
  18. padding-bottom: 0.58rem;
  19. text-align: center;
  20. overflow: hidden;
  21. }
  22. .describe{
  23. width: 2.75rem;
  24. text-align: center;
  25. font-size: 0.14rem;
  26. line-height: 0.2rem;
  27. color: #535353;
  28. margin: auto;
  29. }
  30. .describe text{
  31. color: #FC3907;
  32. }
  33. .triangle{
  34. width: 0.1rem;
  35. height: 0.1rem;
  36. margin: auto;
  37. margin-top: 0.15rem;
  38. margin-bottom: 0.11rem;
  39. }
  40. #taokouling{
  41. display: inline-block;
  42. background: #FFFB00;
  43. min-width: 2rem;
  44. height: 0.24rem;
  45. padding:0 0.14rem;
  46. font-size: 0.16rem;
  47. line-height: 0.24rem;
  48. color:#FF0000;
  49. }
  50. .button{
  51. display: block;
  52. width: 1.3rem;
  53. height: 0.2rem;
  54. color: #FF6000;
  55. font-size: 0.12rem;
  56. border: 0.01rem solid #FF6000;
  57. border-radius: 0.11rem;
  58. margin: auto;
  59. margin-top: 0.3rem;
  60. margin-bottom: 0.3rem;
  61. }
  62. .line{
  63. width: 3.01rem;
  64. border-bottom: 0.01rem dashed #979797;
  65. margin: auto;
  66. margin-bottom: 0.12rem;
  67. }
  68. footer{
  69. color: #FC3907;
  70. font-size: 0.16rem;
  71. line-height: 0.22rem;
  72. }
  73. .activityTime{
  74. width: 3.14rem;
  75. padding-top: 0.12rem;
  76. margin: auto;
  77. }
  78. .activityTime p{
  79. font-size: 0.12rem;
  80. line-height: 0.22rem;
  81. text-align: left;
  82. color: #535353;
  83. }
  84. #copy_1,#copy_2{
  85. position: absolute;
  86. left: -1000rem;
  87. }
  88. </style>
  89. </head>
  90. <body>
  91. <div class="body">
  92. <p class="describe">618啦!发钱啦!猎豆优选送您现金红包!<br/>长按复制淘口令,打开<text>淘宝</text>,点击弹窗进入</p>
  93. <img class="triangle" src="img/318053772993410095.png" />
  94. <text id="taokouling">€Fh5l0EJZ9q0€</text>
  95. <button class="button" onclick="copyPassword()">点击复制淘口令</button>
  96. <input id="copy_1" type="text" readOnly="true" value=""/>
  97. <div id="copy_2"></div>
  98. <div class="line"></div>
  99. <footer>活动时间</footer>
  100. <div class="activityTime">
  101. <p>红包领取时间:</p>
  102. <p>2018.6.01 00:00:00-2018.6.20 23:59:59</p>
  103. <p>红包使用时间:</p>
  104. <p>1、2018.6.01 00:00:00-2018.6.17 23:59:59领取的红包,自领取日起3日内使用有效</p>
  105. <p>2、2018.6.18 00:00:00-2018.6.20 23:59:59领取的红包,使用有效期为2018.6.18 00:00:00-2018.6.20 23:59:59</p>
  106. </div>
  107. </div>
  108. <div class="mask">
  109. <div class="content">
  110. <h3>提示</h3>
  111. <p>复制成功,请前往淘宝</p>
  112. <div onclick="cancelYzm()">我知道了</div>
  113. </div>
  114. </div>
  115. </body>
  116. </html>
  117. <script type="text/javascript">
  118. document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth/375) + "px";
  119. window.onresize = function(){
  120. document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth/375) + "px";
  121. }
  122. function cancelYzm(){
  123. var mask = document.getElementsByClassName('mask')[0];
  124. mask.style.visibility='hidden';
  125. }
  126. function copyPassword() {
  127. var data=document.getElementById("taokouling").innerHTML;
  128. copy_2.innerHTML = data;
  129. copy_1.value = data;
  130. if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
  131. //区分iPhone设备
  132. window.getSelection().removeAllRanges();//这段代码必须放在前面否则无效
  133. var Url2=document.getElementById("copy_2");//要复制文字的节点
  134. var range = document.createRange();
  135. // 选中需要复制的节点
  136. range.selectNode(Url2);
  137. // 执行选中元素
  138. window.getSelection().addRange(range);
  139. // 执行 copy 操作
  140. var successful = document.execCommand('copy');
  141. // 移除选中的元素
  142. window.getSelection().removeAllRanges();
  143. }else{
  144. var Url2=document.getElementById("copy_1");//要复制文字的节点
  145. Url2.select(); // 选择对象
  146. document.execCommand("Copy"); // 执行浏览器复制命令
  147. }
  148. var mask = document.getElementsByClassName('mask')[0];
  149. mask.style.visibility='visible';
  150. }
  151. </script>