-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
78 lines (76 loc) · 1.68 KB
/
index.html
File metadata and controls
78 lines (76 loc) · 1.68 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>关于算法地动画</title>
<style>
.container {
position: relative;
width: 100%;
height: 130px;
}
.card {
position: absolute;
border: 1px dashed red;
width: 50px;
height: 50px;
line-height: 50px;
font-size: 25px;
background: #ccc;
border-radius: 50px;
margin: 10px;
display: inline-flex;
align-items: center;
justify-content: center;
transition: all 0.1s ease-in-out;
}
.swiper-image {
/* border: 1px solid #333; */
font-size: 40px;
display: inline-flex;
align-items: center;
justify-content: center;
position: absolute;
transition: all 0.2s ease-in-out;
left: calc(50% - 100px);
width: 200px;
height: 260px;
border-radius: 10px;
background-color: #ccc;
}
.swiper-image:nth-child(1){
background: #b44149;
z-index: 1;
}
.swiper-image:nth-child(2){
z-index: 2;
background: #d17c23;
}
.swiper-image:nth-child(3){
background: #f2d536;
z-index: 3;
}
.swiper-image:nth-child(4){
background: #6cb540;
z-index: 2;
}
.swiper-image:nth-child(5){
background: #438ec4;
z-index: 1;
}
</style>
</head>
<body>
<div id="root" class="container">
<!-- <span class="card" :style="`transform: translate(${(arr.indexOf(i+1))*120}%,${time*20}%);`" v-for="e in arr">{{i+1}}</span> -->
<span class="swiper-image" :style="`
transform: translateX(${(i-2)*60}%)
scale(${1 - 0.1*(Math.abs(i-2))});
`" v-for="e in arr">
</span>
</div>
<script src="index.js"></script>
</body>
</html>