5151 filter : drop-shadow (0 10px 30px rgba (255 , 20 , 147 , 0.3 ));
5252}
5353
54- .stem {
55- position : absolute;
56- bottom : 0 ;
57- left : 50% ;
58- transform : translateX (-50% );
59- width : 10px ;
60- height : 280px ;
61- background : linear-gradient (to right, # 1a3a0f 0% , # 2d5016 30% , # 4a7c2c 60% , # 3d6625 100% );
62- border-radius : 5px ;
63- animation : stemGrow 1.5s ease-out;
64- box-shadow : inset -2px 0 5px rgba (0 , 0 , 0 , 0.3 ), 2px 0 5px rgba (0 , 0 , 0 , 0.2 );
65- }
66-
67- .leaf {
68- position : absolute;
69- width : 70px ;
70- height : 35px ;
71- background : linear-gradient (135deg , # 5a9c3a 0% , # 4a7c2c 50% , # 3d6625 100% );
72- border-radius : 0 50% 50% 0 ;
73- transform-origin : left center;
74- box-shadow : inset -2px -2px 5px rgba (0 , 0 , 0 , 0.3 ), 2px 2px 5px rgba (0 , 0 , 0 , 0.2 );
75- }
76-
77- .leaf ::after {
78- content : '' ;
79- position : absolute;
80- top : 50% ;
81- left : 0 ;
82- width : 100% ;
83- height : 1px ;
84- background : linear-gradient (to right, # 7cb85d, transparent);
85- transform : translateY (-50% );
86- }
87-
88- .leaf-left {
89- bottom : 140px ;
90- left : 50% ;
91- transform : translateX (-100% ) rotate (-35deg );
92- animation : leafGrow 1.8s ease-out;
93- }
94-
95- .leaf-right {
96- bottom : 100px ;
97- left : 50% ;
98- transform : rotate (35deg );
99- animation : leafGrow 2s ease-out;
100- }
101-
102- .rose {
103- position : absolute;
104- top : -20px ;
105- left : 50% ;
106- transform : translateX (-50% );
107- width : 180px ;
108- height : 180px ;
109- animation : roseBloom 3s ease-out;
110- }
111-
112- .petal {
113- position : absolute;
114- width : 100% ;
115- height : 100% ;
116- }
117-
118- .petal ::before {
119- content : '' ;
120- position : absolute;
121- top : 50% ;
122- left : 50% ;
123- width : 85px ;
124- height : 95px ;
125- background : radial-gradient (ellipse at 40% 35% ,
126- # ffb8d4 0% ,
127- # ff8fc7 20% ,
128- # ff69b4 40% ,
129- # ff1493 70% ,
130- # c71585 100% );
131- border-radius : 50% 50% 50% 20% ;
132- transform : translate (-50% , -50% );
133- box-shadow :
134- inset -3px -3px 8px rgba (199 , 21 , 133 , 0.6 ),
135- inset 3px 3px 8px rgba (255 , 182 , 193 , 0.4 ),
136- 0 2px 8px rgba (255 , 20 , 147 , 0.4 );
137- }
138-
139- .petal : nth-child (1 ) {
140- transform : rotate (0deg );
141- animation : petalOpen 2.5s ease-out;
142- }
143-
144- .petal : nth-child (1 )::before {
145- background : radial-gradient (ellipse at 35% 30% ,
146- # ffc8e0 0% ,
147- # ffb8d4 15% ,
148- # ff8fc7 35% ,
149- # ff69b4 55% ,
150- # ff1493 75% ,
151- # c71585 100% );
152- }
153-
154- .petal : nth-child (2 ) {
155- transform : rotate (45deg );
156- animation : petalOpen 2.7s ease-out;
157- }
158-
159- .petal : nth-child (3 ) {
160- transform : rotate (90deg );
161- animation : petalOpen 2.9s ease-out;
162- }
163-
164- .petal : nth-child (3 )::before {
165- background : radial-gradient (ellipse at 38% 32% ,
166- # ffb8d4 0% ,
167- # ff8fc7 20% ,
168- # ff69b4 45% ,
169- # ff1493 70% ,
170- # c71585 100% );
171- }
172-
173- .petal : nth-child (4 ) {
174- transform : rotate (153deg );
175- animation : petalOpen 2.8s ease-out forwards;
176- }
177-
178- .petal : nth-child (5 ) {
179- transform : rotate (204deg );
180- animation : petalOpen 2.9s ease-out forwards;
181- }
182-
183- .petal : nth-child (6 ) {
184- transform : rotate (255deg );
185- animation : petalOpen 3s ease-out forwards;
186- }
187-
188- .petal : nth-child (7 ) {
189- transform : rotate (306deg );
190- animation : petalOpen 3.1s ease-out forwards;
191- }
192-
193- /* 内层花瓣 */
194- .inner-petal {
195- position : absolute;
196- width : 100% ;
197- height : 100% ;
198- }
199-
200- .inner-petal ::before {
201- content : '' ;
202- position : absolute;
203- top : 50% ;
204- left : 50% ;
205- width : 70px ;
206- height : 80px ;
207- background : radial-gradient (ellipse at 30% 20% ,
208- # ffd0e8 0% ,
209- # ffb8da 15% ,
210- # ff8fc7 35% ,
211- # ff4da6 60% ,
212- # ff1493 85% ,
213- # c71585 100% );
214- border-radius : 70% 50% 70% 50% ;
215- transform : translate (-50% , -50% ) rotate (-5deg );
216- box-shadow :
217- inset -3px -3px 10px rgba (199 , 21 , 133 , 0.8 ),
218- inset 3px 3px 10px rgba (255 , 208 , 232 , 0.6 ),
219- 0 2px 10px rgba (255 , 20 , 147 , 0.6 );
220- }
221-
222- .inner-petal : nth-child (8 ) {
223- transform : rotate (25deg );
224- animation : petalOpen 3.2s ease-out forwards;
225- }
226-
227- .inner-petal : nth-child (9 ) {
228- transform : rotate (95deg );
229- animation : petalOpen 3.3s ease-out forwards;
230- }
231-
232- .inner-petal : nth-child (10 ) {
233- transform : rotate (165deg );
234- animation : petalOpen 3.4s ease-out forwards;
235- }
236-
237- .inner-petal : nth-child (11 ) {
238- transform : rotate (235deg );
239- animation : petalOpen 3.5s ease-out forwards;
240- }
241-
242- .inner-petal : nth-child (12 ) {
243- transform : rotate (305deg );
244- animation : petalOpen 3.6s ease-out forwards;
245- }
246-
247- .rose-center {
248- position : absolute;
249- top : 50% ;
250- left : 50% ;
251- transform : translate (-50% , -50% );
252- width : 50px ;
253- height : 50px ;
254- background : radial-gradient (circle at 35% 35% ,
255- # ffe0f0 0% ,
256- # ffb6c1 15% ,
257- # ff8fa3 35% ,
258- # ff1493 60% ,
259- # c71585 85% ,
260- # 8b0a50 100% );
261- border-radius : 50% ;
262- animation : centerPulse 2s infinite;
263- box-shadow :
264- inset -3px -3px 10px rgba (139 , 10 , 80 , 0.8 ),
265- inset 3px 3px 10px rgba (255 , 192 , 203 , 0.6 ),
266- 0 0 20px rgba (255 , 20 , 147 , 0.5 );
267- }
268-
269- .rose-center ::before {
270- content : '' ;
271- position : absolute;
272- top : 20% ;
273- left : 25% ;
274- width : 18px ;
275- height : 18px ;
276- background : radial-gradient (circle at 30% 30% ,
277- rgba (255 , 255 , 255 , 0.7 ),
278- rgba (255 , 192 , 224 , 0.3 ),
279- transparent);
280- border-radius : 50% ;
281- filter : blur (2px );
282- }
283-
284- .rose-center ::after {
285- content : '' ;
286- position : absolute;
287- top : 60% ;
288- right : 25% ;
289- width : 10px ;
290- height : 10px ;
291- background : radial-gradient (circle,
292- rgba (255 , 255 , 255 , 0.4 ),
293- transparent);
294- border-radius : 50% ;
295- filter : blur (1px );
296- }
297-
29854.message-box {
29955 background : rgba (255 , 255 , 255 , 0.95 );
30056 border-radius : 25px ;
405161 }
406162}
407163
408- @keyframes stemGrow {
409- from {
410- height : 0 ;
411- }
412- to {
413- height : 320px ;
414- }
415- }
416-
417- @keyframes leafGrow {
418- from {
419- opacity : 0 ;
420- transform : scale (0 );
421- }
422- to {
423- opacity : 1 ;
424- transform : scale (1 );
425- }
426- }
427-
428164@keyframes roseGrow {
429165 from {
430166 transform : scale (0 );
434170 }
435171}
436172
437- @keyframes roseBloom {
438- from {
439- transform : translateX (-50% ) scale (0 );
440- opacity : 0 ;
441- }
442- to {
443- transform : translateX (-50% ) scale (1 );
444- opacity : 1 ;
445- }
446- }
447-
448- @keyframes petalOpen {
449- from {
450- transform : scale (0 );
451- opacity : 0 ;
452- }
453- to {
454- transform : scale (1 );
455- opacity : 1 ;
456- }
457- }
458-
459- @keyframes centerPulse {
460- 0% , 100% {
461- transform : translate (-50% , -50% ) scale (1 );
462- }
463- 50% {
464- transform : translate (-50% , -50% ) scale (1.1 );
465- }
466- }
467-
468173@keyframes heartFloat {
469174 0% {
470175 bottom : -50px ;
@@ -514,25 +219,28 @@ <h1 class="valentine-title">💕 Happy Valentine's Day 💕</h1>
514219 < h2 class ="subtitle "> To my dearest Wutong</ h2 >
515220
516221 < div class ="rose-container ">
517- < div class ="rose ">
518- < div class ="petal "> </ div >
519- < div class ="petal "> </ div >
520- < div class ="petal "> </ div >
521- < div class ="petal "> </ div >
522- < div class ="petal "> </ div >
523- < div class ="petal "> </ div >
524- < div class ="petal "> </ div >
525- < div class ="inner-petal "> </ div >
526- < div class ="inner-petal "> </ div >
527- < div class ="inner-petal "> </ div >
528- < div class ="inner-petal "> </ div >
529- < div class ="inner-petal "> </ div >
530- < div class ="rose-center "> </ div >
531- </ div >
532- < div class ="stem ">
533- < div class ="leaf leaf-left "> </ div >
534- < div class ="leaf leaf-right "> </ div >
535- </ div >
222+ < svg width ="300 " height ="450 " viewBox ="0 0 300 450 " xmlns ="http://www.w3.org/2000/svg ">
223+ <!-- Stem -->
224+ < path d ="M150 450 C150 450 140 300 150 200 C160 100 150 100 150 100 " stroke ="#228B22 " stroke-width ="10 " fill ="none " />
225+
226+ <!-- Leaves -->
227+ < path d ="M150 300 Q100 250 80 300 Q100 350 150 300 " fill ="#228B22 " stroke ="#006400 " stroke-width ="2 " />
228+ < path d ="M150 350 Q200 300 220 350 Q200 400 150 350 " fill ="#228B22 " stroke ="#006400 " stroke-width ="2 " />
229+ < path d ="M150 250 Q120 200 100 250 Q120 300 150 250 " fill ="#228B22 " stroke ="#006400 " stroke-width ="2 " />
230+
231+ <!-- Outer Petals -->
232+ < path d ="M150 100 Q100 50 50 100 Q100 150 150 100 Q200 150 250 100 Q200 50 150 100 " fill ="#FF69B4 " stroke ="#C71585 " stroke-width ="2 " />
233+ < path d ="M150 100 Q100 0 50 50 Q0 100 50 150 Q100 200 150 150 " transform ="rotate(45 150 100) " fill ="#FF1493 " stroke ="#C71585 " stroke-width ="2 " />
234+ < path d ="M150 100 Q200 0 250 50 Q300 100 250 150 Q200 200 150 150 " transform ="rotate(-45 150 100) " fill ="#FF1493 " stroke ="#C71585 " stroke-width ="2 " />
235+
236+ <!-- Inner Petals -->
237+ < path d ="M150 100 Q120 70 100 100 Q120 130 150 100 Q180 130 200 100 Q180 70 150 100 " fill ="#FFB6C1 " stroke ="#FF69B4 " stroke-width ="1 " />
238+ < path d ="M150 100 Q130 80 110 100 Q130 120 150 100 " transform ="rotate(30 150 100) " fill ="#FFC0CB " stroke ="#FF69B4 " stroke-width ="1 " />
239+ < path d ="M150 100 Q170 80 190 100 Q170 120 150 100 " transform ="rotate(-30 150 100) " fill ="#FFC0CB " stroke ="#FF69B4 " stroke-width ="1 " />
240+
241+ <!-- Center -->
242+ < circle cx ="150 " cy ="100 " r ="20 " fill ="#FFD700 " stroke ="#DAA520 " stroke-width ="2 " />
243+ </ svg >
536244 </ div >
537245
538246 < div class ="message-box ">
@@ -596,4 +304,4 @@ <h2 class="subtitle">To my dearest Wutong</h2>
596304for ( let i = 0 ; i < 10 ; i ++ ) {
597305 setTimeout ( createHeart , i * 200 ) ;
598306}
599- </ script >
307+ </ script >
0 commit comments