-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlove.html
259 lines (241 loc) · 8.09 KB
/
love.html
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>TO Ying 520</title>
<style>
body{
overflow: hidden;
}
* {
margin: 0;
padding: 0
}
.cover{
width: 100vw;
height: 100vw;
display: flex;
flex-direction: column;
}
#app{
background-color: #fff;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
}
.start {
width: 80px;
height: 30px;
line-height: 30px;
border-radius: 10px;
border: 1px solid;
text-align: center;
}
.body_left {
display: flex;
justify-content: center;
align-items: center;
z-index: 98;
}
.body_left img{
transform: rotate(90deg);
}
.body_left image {
height: 60%;
}
.body_right {
display: flex;
justify-content: center;
align-items: center;
}
.megirls{
transform: rotate(90deg);
}
.megirls .text{
color:red;
font-size:25px;
}
.love-block {
transform: rotate(90deg);
position: relative;
width: 195px;
height: 165px;
display: grid;
margin-top: 100px;
grid-template-rows: repeat(11, 15px);
grid-template-columns: repeat(13, 15px);
}
.UpMove {
animation: upmove 5s linear 1;
animation-fill-mode: forwards;
-webkit-animation-fill-mode: forwards;
}
.UpMove2 {
animation: upmove2 5s linear 1;
animation-fill-mode: forwards;
-webkit-animation-fill-mode: forwards;
}
.beat{
animation: heartBeat 1s infinite;
margin-right: -100%;
}
@keyframes heartBeat {
0% {
transform: scale(1) rotate(90deg);
}
50% {
transform: scale(1.1) rotate(90deg);
}
100% {
transform: scale(1) rotate(90deg);
}
}
@keyframes upmove {
0% {
margin-right: 0;
}
50% {
margin-right: -50%;
}
100% {
margin-right: -100%;
}
}
[v-cloak]{
display: none;
}
@keyframes upmove2 {
0% {
left:0
}
50% {
left:15%
}
100% {
left:20%
}
}
</style>
</head>
<body>
<div id="app" v-cloak>
<div class="cover" >
<div class="body_left">
<img src="https://starm328.github.io/images/biubiu.gif" alt="GIF Image">
</div>
<div class="body_right">
<div v-if="showImg" class="megirls" style="position: absolute;left:50%;margin-left:-130px;margin-top:100px">
<img src="https://starm328.github.io/images/girls.jpg" style="height:200px;margin:0 auto; display: block;">
<div class="text">我的女孩520快乐!</div>
</div>
<div class="megirls UpMove2" style="position: absolute;left:50%;margin-top:100px;font-size:18px">
<div class="text"><p v-if="showImg2">喜欢你,我很认真</p><p v-if="showImg3">认真到想和你相守一辈子</p><p v-if="showImg4">第一个520</p><p v-if="showImg5">很幸运也很特殊</p><p v-if="showImg6">520遇上1314,我爱你!</p></div>
</div>
<div class="love-block" :class="{ UpMove: showOK,beat:showImg }">
<div style="position: relative;width: 15px;height: 15px;" v-for="item in showloveList">
<img src="https://starm328.github.io/images/love.png"
style="position: relative;width: 15px;height: 15px;" v-if="item == '1'">
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
var app5 = new Vue({
el: '#app',
data:{
loveList: [],
hideLoveList: [1, 2, 6, 7, 8, 12, 13, 14, 20, 26, 66, 78, 79, 80, 90, 91, 92, 93, 94, 102, 103, 104, 105, 106, 107, 108, 114, 115, 116, 117, 118, 119, 120, 121, 122, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 141, 142, 143],
showNumber: 13,
loveNumber: 11 * 13,
showTime: 0,
severalTimes: 1,
showloveList: [],
showOK: false,
showImg: false,
showImg2:false,
showImg3:false,
showImg4:false,
showImg5:false,
showImg6:false,
width:0,
height:0
},
created() {
this.getLoveList()
this.showTime = Math.ceil(this.loveNumber / this.showNumber)
this.width = window.innerWidth
this.height = window.innerHeight
},
mounted() {
//git动画是12000ms
let _this = this
setTimeout(() => {
_this.showLive()
}, 11000)
},
methods: {
getLoveList() {
for (let i = 0; i < 143; i++) {
this.loveList.push('1')
}
this.loveList.forEach((v, n) => {
this.hideLoveList.forEach(h => {
if (n == h - 1) {
this.loveList[n] = '0'
}
})
})
},
showLive() {
let _this = this
console.log("执行一次")
if (this.severalTimes > this.showTime) {
console.log("绘制完成")
this.showOK = true
setTimeout(() => {
_this.showImg2 = true
}, 3000)
setTimeout(() => {
_this.showImg3 = true
}, 4500)
setTimeout(() => {
_this.showImg4 = true
}, 5500)
setTimeout(() => {
_this.showImg5 = true
}, 6500)
setTimeout(() => {
_this.showImg6 = true
}, 7500)
setTimeout(() => {
_this.showImg2 = false
_this.showImg3 = false
_this.showImg4 = false
_this.showImg5 = false
_this.showImg6 = false
_this.showImg = true
this.showOK = false
}, 10000)
} else {
let loveList = []
this.loveList.forEach((v, n) => {
if (n < this.severalTimes * this.showNumber) {
loveList.push(this.loveList[n])
}
})
this.showloveList = loveList
this.severalTimes++
setTimeout(() => {
_this.showLive()
}, 500)
}
},
}
})
</script>
</body>
</html>