share.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="UTF-8">
  5. <!-- <meta name="divport" content="width=device-width, initial-scale=1.0"> -->
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" />
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8. <title></title>
  9. </head>
  10. <body>
  11. <div class="border" id="shareImage">
  12. <div class="content">
  13. <div class="title_1" styletext-align: center;
  14. font-size: 26px;
  15. font-weight: bold;
  16. line-height: 88px;
  17. color: #23459D;
  18. opacity: 1;>
  19. <text>郑州</text>>>><text>安阳</text>
  20. </div>
  21. <div class="title_2">
  22. 郑州回安阳过年需要隔离吗?
  23. </div>
  24. <div class="text_1">
  25. 对于在湖北入境的人员,实施“14+14”的健康管理措施。即14天集中隔离医学观察,期间进行2次核酸检测和1次抗体检测;集中隔离医学观察期满后再实施14天居家医学观察,期间进行两次核酸检测。入境人员隔离点应在隔离对象隔离期满前3天,将隔离人员相关信息通知其地新冠肺炎疫情防控指挥部,以便当地落实居家医学观察。
  26. 天居家医学观察,期间进行两次核酸检测。入境人员隔离点应在隔离对象隔离期满前3天,将隔离人员相关信息通知其地新冠肺炎疫情防控指挥部,以便当地落实居家医学观察。
  27. </div>
  28. <div class="tip_share">
  29. <div class="left_share">
  30. <img class='share_img' src="img/erwei.jpg" mode=""></img>
  31. </div>
  32. <div class="right_share">
  33. <div class="">
  34. 数据来源(可点击,数据来源列表)
  35. </div>
  36. <div class="">
  37. <text>xxxx</text>城市疫情防控指挥中心
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <img class="btimg" src="img/btimg.png" mode=""></img>
  43. <img src="img/icon6.png" mode="" class="icon"></img>
  44. </div>
  45. <div id="size">
  46. </div>
  47. </body>
  48. <script src="./js/html2canvas.js" type="text/javascript"></script>
  49. <script src="./js/html2canvas.min.js" type="text/javascript"></script>
  50. <script type="text/javascript">
  51. html2canvas(document.querySelector("#shareImage"), {
  52. backgroundColor:'#0FC6A1',
  53. width: 600,
  54. height: 600
  55. }).then(canvas => {
  56. document.body.appendChild(canvas)
  57. });
  58. // new html2canvas(document.getElementById('shareImage'),{
  59. // width:550;
  60. // }).then(canvas => {
  61. // // canvas为转换后的Canvas对象
  62. // let oImg = new Image();
  63. // oImg.src = canvas.toDataURL(); // 导出图片
  64. // document.getElementById('size').appendChild(oImg); // 将生成的图片添加到body
  65. // });
  66. </script>
  67. <style type="text/css">
  68. body {
  69. height: 100%;
  70. margin: 0;
  71. padding: 0;
  72. }
  73. #size {
  74. margin: 30px;
  75. background-color: #00BFFF;
  76. }
  77. /* #size{
  78. height: 600px;
  79. width: 600px;
  80. } */
  81. /* #shareImage{
  82. width: 600px;
  83. height: 600px;
  84. } */
  85. #shareImage {
  86. /* width: 100%; */
  87. position: relative;
  88. /* height:100%; */
  89. padding: 0 15px;
  90. padding-top: 50px;
  91. padding-bottom: 40px;
  92. /* height: 600px; */
  93. background: linear-gradient(180deg, #1E37EB 0%, #0FC6A1 100%);
  94. }
  95. .content {
  96. padding: 45px 17px;
  97. background-color: #FFFFFF;
  98. border-radius: 12px;
  99. margin-bottom: 170px;
  100. }
  101. .btimg {
  102. position: absolute;
  103. left: 0;
  104. bottom: 0;
  105. }
  106. .icon {
  107. position: absolute;
  108. top: 23px;
  109. right: 15px;
  110. height: 80px;
  111. width: 80px;
  112. }
  113. .title_1 {
  114. text-align: center;
  115. font-size: 26px;
  116. font-weight: bold;
  117. line-height: 88px;
  118. color: #23459D;
  119. opacity: 1;
  120. }
  121. .title_2 {
  122. text-align: center;
  123. font-size: 20px;
  124. font-weight: bold;
  125. line-height: 34px;
  126. color: #333333;
  127. opacity: 1;
  128. margin-top: 10px;
  129. margin-bottom: 20px;
  130. }
  131. .text_1 {
  132. font-size: 14px;
  133. font-weight: 400;
  134. line-height: 21px;
  135. color: #333333;
  136. opacity: 1;
  137. }
  138. .tip_share {
  139. display: flex;
  140. margin-top: 32px;
  141. }
  142. .left_share {
  143. flex:0 0 40%;
  144. background-color: #00BFFF;
  145. /* display: inline-block;
  146. vertical-align: middle; */
  147. }
  148. .share_img {
  149. height: 60px;
  150. width: 60px;
  151. margin-left: 30px;
  152. background-image: url(img/erwei.jpg);
  153. background-size: 60px;
  154. /* right: 17px; */
  155. }
  156. .right_share {
  157. flex:0 0 60%;
  158. /* display: inline-block;
  159. vertical-align: middle; */
  160. text-align: right;
  161. margin-top: 8px;
  162. font-size: 14px;
  163. font-weight: 400;
  164. line-height: 21px;
  165. color: #333333;
  166. opacity: 1;
  167. }
  168. </style>
  169. </html>