绿满眶商城微信小程序-uniapp
peng
2025-06-27 3f7acbae32700d7c3c2f883968ea33d436df5219
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
<template>
  <view class="animations">
    <view class="box" :style="{ '--color': color }">
      <view class="sword"></view>
      <view class="sword"></view>
      <view class="sword"></view>
    </view>
  </view>
</template>
 
<script>
export default {
  name: "loading-sword",
  props: {
    color: {
      type: String,
      default: "#ED213A",
    },
  },
  data() {
    return {};
  },
};
</script>
 
<style lang="scss" scoped>
.box {
  position: relative;
  width: 120rpx;
  height: 120rpx;
}
.sword {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.sword:nth-of-type(1) {
  left: 0%;
  top: 0%;
  border-bottom: 8rpx solid var(--color);
  animation: sword1 0.8s linear infinite;
}
.sword:nth-of-type(2) {
  right: 0%;
  top: 0%;
  border-right: 8rpx solid var(--color);
  animation: sword2 0.8s linear infinite;
}
.sword:nth-of-type(3) {
  right: 0%;
  bottom: 0%;
  border-top: 8rpx solid var(--color);
  animation: sword3 0.8s linear infinite;
}
@keyframes sword1 {
  0% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
  }
}
@keyframes sword2 {
  0% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
  }
}
 
@keyframes sword3 {
  0% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
  }
}
</style>