1+ * {
2+ margin : 0 ;
3+ padding : 0 ;
4+ box-sizing : border-box;
5+ }
6+
7+ body {
8+ background : linear-gradient (135deg , # 1a1a2e 0% , # 16213e 100% );
9+ height : 100vh ;
10+ display : flex;
11+ justify-content : center;
12+ align-items : center;
13+ overflow : hidden;
14+ }
15+
16+ .container {
17+ position : relative;
18+ width : 600px ;
19+ height : 400px ;
20+ }
21+
22+ .sword {
23+ position : absolute;
24+ width : 40px ;
25+ height : 200px ;
26+ animation : bounce 2s ease-in-out infinite;
27+ }
28+
29+ .sword1 {
30+ left : 100px ;
31+ animation-delay : 0s ;
32+ }
33+
34+ .sword2 {
35+ left : 280px ;
36+ animation-delay : 0.3s ;
37+ }
38+
39+ .sword3 {
40+ left : 460px ;
41+ animation-delay : 0.6s ;
42+ }
43+
44+ .blade {
45+ width : 8px ;
46+ height : 140px ;
47+ background : linear-gradient (to bottom, # e0e0e0 0% , # a8a8a8 100% );
48+ margin : 0 auto;
49+ border-radius : 4px 4px 0 0 ;
50+ box-shadow : inset 2px 0 4px rgba (255 , 255 , 255 , 0.5 ),
51+ inset -2px 0 4px rgba (0 , 0 , 0 , 0.3 );
52+ }
53+
54+ .guard {
55+ width : 40px ;
56+ height : 8px ;
57+ background : linear-gradient (to right, # d4af37 0% , # f4e99b 50% , # d4af37 100% );
58+ margin : 0 auto;
59+ border-radius : 2px ;
60+ box-shadow : 0 2px 4px rgba (0 , 0 , 0 , 0.4 );
61+ }
62+
63+ .handle {
64+ width : 12px ;
65+ height : 40px ;
66+ background : linear-gradient (to bottom, # 8b4513 0% , # 5c2e0a 100% );
67+ margin : 2px auto;
68+ border-radius : 2px ;
69+ }
70+
71+ .pommel {
72+ width : 16px ;
73+ height : 16px ;
74+ background : radial-gradient (circle, # d4af37 0% , # a67c00 100% );
75+ margin : 0 auto;
76+ border-radius : 50% ;
77+ box-shadow : 0 2px 4px rgba (0 , 0 , 0 , 0.4 );
78+ }
79+
80+ @keyframes bounce {
81+ 0% , 100% {
82+ transform : translateY (0 ) rotate (0deg );
83+ }
84+ 25% {
85+ transform : translateY (-80px ) rotate (-15deg );
86+ }
87+ 50% {
88+ transform : translateY (-150px ) rotate (0deg );
89+ }
90+ 75% {
91+ transform : translateY (-80px ) rotate (15deg );
92+ }
93+ }
0 commit comments