-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwo_tone.html
60 lines (57 loc) · 2.29 KB
/
two_tone.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Animate in loop</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lottie-web/5.12.2/lottie_svg.min.js"></script>
<link rel="stylesheet" href="style.css">
<style>
.mgc_primary_stroke {
stroke: #09244B;
}
.mgc_secondary_stroke {
stroke: #007AFF;
}
.mgc_primary_fill {
fill: #09244B;
}
.mgc_secondary_fill {
fill: #007AFF;
}
</style>
</head>
<body>
<div class="dialog-gray-mark" :class="{'fade-enter-mark':isShowDialogMark, 'fade-leave-mark':!isShowDialogMark}" v-show="isShowDialogMark" @click="hideDialog()"></div>
<div class="dialog-box">
<div class="dialog-header">
<div class="center-cont">
<div class="title">Two-tone</div>
</div>
</div>
<div class="demo-wrap">
<span class="icon" id="lottie-demo"></span>
<span class="infomation">There are 4 css classes to change colors.You can modify Hex to achieve your color. </br>
.mgc_primary_stroke {stroke: #09244B;}</br>
.mgc_secondary_stroke {stroke: #007AFF;}</br>
.mgc_primary_fill {fill: #09244B;}</br>
.mgc_secondary_fill {fill: #007AFF;}</span>
<span class="desc">Made by <a href="https://www.mingcute.com/animation" target="_blank">MingCute.com</a></span>
</div>
</div>
</body>
<script>
(function() {
let svgContainer = document.querySelector('#lottie-demo');
let animItem = lottie.loadAnimation({
wrapper: svgContainer,
animType: 'svg',
loop: false,
autoplay: false,
path: "https://raw.githubusercontent.com/Richard9394/MingCute-animation/main/json/arrow_left_line.json"
});
svgContainer.addEventListener('mouseenter', (e) => {
animItem.playSegments([0, 100], true);
});
})();
</script>
</html>