index.html
4.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<!--[if lte IE 6 ]> <html class="ie ie6 lte_ie7 lte_ie8 lte_ie9" lang="zh-CN"> <![endif]-->
<!--[if IE 7 ]> <html class="ie ie7 lte_ie7 lte_ie8 lte_ie9" lang="zh-CN"> <![endif]-->
<!--[if IE 8 ]> <html class="ie ie8 lte_ie8 lte_ie9" lang="zh-CN"> <![endif]-->
<!--[if IE 9 ]> <html class="ie ie9 lte_ie9" lang="zh-CN"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html lang="zh-CN">
<!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit" />
<meta charset="utf-8">
<title>捷报</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="Keystion">
<link href="" rel="stylesheet">
<!-- <script type="text/javascript" src="https://hk-h5.gaoxiaobang.com/assets/script/flexible.js"></script> -->
<script type="text/javascript" src="https://webclown.net/assets/script/jquery/jquery.min.2.0.1.js"></script>
<script type="text/javascript" src="http://html2canvas.hertzen.com/dist/html2canvas.min.js"></script>
<script type="text/javascript">
// var timer = setInterval(function() { if (typeof flexible == 'function') { flexible();
// clearInterval(timer); } }, 1);
</script>
<style type="text/css">
* {
margin: 0;
padding: 0;
list-style: none;
}
body {
}
.page{
background-color: #E11F2F;
padding: 40px;
width: 700px;
margin: 0 auto;
}
header {
position: relative;
height: 204px;
}
header .logo {
position: absolute;
right: -18px;
top: -27px;
width: 120px;
}
header .logo img {
height: 100%;
width: 100%;
}
h1 {
font-size: 170px;
text-align: center;
line-height: 1;
color: #fff;
-webkit-box-reflect: below -18px -webkit-linear-gradient(bottom, rgba(255,255,255,0.3) 0%, transparent 25%, transparent 100%)
}
main {
background-color: #fff;
border-radius: 10px;
padding: 20px;
}
.member-hd {
font-size: 28px;
font-weight: bold;
margin-bottom: 16px;
}
.member-list {
margin-right: -18px;
list-style: none;
display: flex;
flex-wrap: wrap;
-webkit-box-pack: start;
justify-content: flex-start;
}
.member-list:after {
content: "";
display: table;
clear: both;
}
.member-list li {
flex-grow: 0;
width: 25%;
box-sizing: border-box;
padding-right: 18px;
margin-bottom: 18px;
}
.member-list li img {
width: 100%;
}
.member-list li .member-name,
.member-list li .member-region {
font-size: 0.88rem;
font-weight: bold;
line-height: 20px;
}
.pic {
min-height: 500px;
}
.pic img {
width: 100%;
}
footer{
text-align: right;
font-size: 1.2rem;
font-weight: bold;
margin-bottom: 1rem;
}
.num{
color: #f00;
}
#modal{
position: absolute;
height: 80vh;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border: 10px solid #000;
display: none;
background-color: #fff;
}
#modal img{
height: calc(100% - 1em);
vertical-align: top;
}
</style>
</head>
<body>
<button onclick="report()">Take screenshot</button>
<div class="page" id="capture">
<header>
<div class="logo">
<img src="./src/assets/images/logo-huike.svg">
</div>
<h1>捷报</h1>
</header>
<main>
<div class="members">
<div class="member-hd">
项目成员:
</div>
<ul class="member-list">
<li>
<img src="//images.webclown.net/20181128013116.png">
<p><span class="member-name">关书杰</span></p>
<p><span class="member-region">教育产品部</span></p>
</li>
<li>
<img src="//images.webclown.net/20181128013116.png">
<p><span class="member-name">关书杰</span></p>
<p><span class="member-region">教育产品部</span></p>
</li>
<li>
<img src="//images.webclown.net/20181128013116.png">
<p><span class="member-name">关书杰</span></p>
<p><span class="member-region">教育产品部</span></p>
</li>
<li>
<img src="//images.webclown.net/20181128013116.png">
<p><span class="member-name">关书杰</span></p>
<p><span class="member-region">教育产品部</span></p>
</li>
</ul>
</div>
<div class="pic">
<br>
<br>
<br>
<br>
<img src="//images.webclown.net/20181128002721.png">
</div>
<footer>中标金额:<span class="num"><span>154.6</span>万</span></footer>
</main>
</div>
<div id="modal">
<div>已生成图片,点击右键保存。</div>
<img src="" style="display: none;">
</div>
<script type="text/javascript">
function report() {
html2canvas(document.querySelector("#capture"),{useCORS: true}).then(canvas => {
// document.body.appendChild(canvas)
$('#modal').show().find('img').attr('src', canvas.toDataURL()).show();
});
}
</script>
</body>
</html>