|
@@ -1,20 +1,96 @@
|
1
|
1
|
<template>
|
2
|
|
- <div class="left-grass">
|
3
|
|
-
|
|
2
|
+ <div class="right-grass-box">
|
|
3
|
+ <img class="right-grass" :src="grassImage" alt="" style="z-index: 2">
|
|
4
|
+ <img class="flower-motion flower-1" :src="flower1Image" alt="" style="z-index: 1">
|
|
5
|
+ <img class="flower-motion flower-2" :src="flower2Image" alt="" style="z-index: 1">
|
|
6
|
+ <img class="flower-motion flower-3" :src="flower3Image" alt="" style="z-index: 1">
|
|
7
|
+ <img class="leaf-motion grass-leaf" :src="leafImage" alt="" style="z-index: 3">
|
4
|
8
|
</div>
|
5
|
9
|
</template>
|
6
|
10
|
|
7
|
11
|
<script setup>
|
|
12
|
+import grassImage from '@/assets/GrassImage/right-grass.png'
|
|
13
|
+import flower1Image from '@/assets/GrassImage/flower-1.png'
|
|
14
|
+import flower2Image from '@/assets/GrassImage/flower-2.png'
|
|
15
|
+import flower3Image from '@/assets/GrassImage/flower-3.png'
|
|
16
|
+import leafImage from '@/assets/GrassImage/right-grass-leaf.png'
|
8
|
17
|
|
9
|
18
|
</script>
|
10
|
19
|
|
11
|
20
|
<style lang="less" scoped>
|
12
|
|
-.left-grass {
|
13
|
|
- width: 25vw;
|
14
|
|
- height: 28vw;
|
|
21
|
+.right-grass-box {
|
15
|
22
|
position: absolute;
|
16
|
23
|
right: 0;
|
17
|
24
|
bottom: 0;
|
18
|
|
- overflow: hidden;
|
|
25
|
+ z-index: 0;
|
|
26
|
+
|
|
27
|
+ & > img {
|
|
28
|
+ position: absolute;
|
|
29
|
+ right: 0;
|
|
30
|
+ bottom: 0;
|
|
31
|
+ will-change: transform;
|
|
32
|
+ }
|
|
33
|
+
|
|
34
|
+ .flower-motion {
|
|
35
|
+ transform-origin: center bottom;
|
|
36
|
+ animation-name: windblow;
|
|
37
|
+ animation-duration: 6s;
|
|
38
|
+ animation-timing-function: linear;
|
|
39
|
+ animation-iteration-count: infinite;
|
|
40
|
+ }
|
|
41
|
+
|
|
42
|
+ .leaf-motion {
|
|
43
|
+ transform-origin: right bottom;
|
|
44
|
+ animation-name: windblow2;
|
|
45
|
+ animation-duration: 6s;
|
|
46
|
+ animation-timing-function: linear;
|
|
47
|
+ animation-iteration-count: infinite;
|
|
48
|
+ }
|
|
49
|
+
|
|
50
|
+ @keyframes windblow {
|
|
51
|
+ 50% {
|
|
52
|
+ transform: rotate(-10deg);
|
|
53
|
+ }
|
|
54
|
+ }
|
|
55
|
+
|
|
56
|
+ @keyframes windblow2 {
|
|
57
|
+ 50% {
|
|
58
|
+ transform: rotate(-8deg);
|
|
59
|
+ }
|
|
60
|
+ }
|
|
61
|
+
|
|
62
|
+ .right-grass {
|
|
63
|
+ width: 25vw;
|
|
64
|
+ height: 28vw;
|
|
65
|
+ }
|
|
66
|
+
|
|
67
|
+ .flower-1 {
|
|
68
|
+ width: 15vw;
|
|
69
|
+ height: 10vw;
|
|
70
|
+ right: 13.2vw;
|
|
71
|
+ bottom: 1vw;
|
|
72
|
+ animation-delay: 0;
|
|
73
|
+ }
|
|
74
|
+
|
|
75
|
+ .flower-2 {
|
|
76
|
+ width: 9vw;
|
|
77
|
+ height: 16.5vw;
|
|
78
|
+ right: 8vw;
|
|
79
|
+ bottom: 6vw;
|
|
80
|
+ animation-delay: 1s;
|
|
81
|
+ }
|
|
82
|
+
|
|
83
|
+ .flower-3 {
|
|
84
|
+ width: 8.7vw;
|
|
85
|
+ height: 16vw;
|
|
86
|
+ right: 3vw;
|
|
87
|
+ bottom: 14vw;
|
|
88
|
+ animation-delay: 2s;
|
|
89
|
+ }
|
|
90
|
+
|
|
91
|
+ .grass-leaf {
|
|
92
|
+ width: 10.7vw;
|
|
93
|
+ height: 21vw;
|
|
94
|
+ }
|
19
|
95
|
}
|
20
|
96
|
</style>
|