Skip to content

Commit f8c29c4

Browse files
committed
update: add some transition and animation
1 parent 2b92bd7 commit f8c29c4

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

blog.css

+41-1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,19 @@
137137
}
138138

139139
@layer components {
140+
@keyframes spin {
141+
0% {
142+
--angle: 0deg;
143+
}
144+
100% {
145+
--angle: 360deg;
146+
}
147+
}
148+
@property --angle {
149+
syntax:'<angle>';
150+
initial-value: 0deg;
151+
inherits: false;
152+
}
140153
.blog {
141154
--post-textColor: #555555;
142155

@@ -244,6 +257,7 @@
244257
}
245258

246259
& .posts {
260+
width: 100%;
247261
display: flex;
248262
flex-direction: column;
249263
gap: 60px;
@@ -252,7 +266,7 @@
252266
width: 100%;
253267
display: flex;
254268
justify-content: space-between;
255-
gap: 24px;
269+
/* gap: 24px; */
256270
position: relative;
257271

258272
@media (max-width: 651px) {
@@ -280,6 +294,8 @@
280294
& .info {
281295
width: 100%;
282296
height: 400px;
297+
background-color: #fff;
298+
padding: 24px;
283299
overflow: hidden;
284300
flex: 1;
285301
@media (max-width: 821px) {
@@ -386,6 +402,30 @@
386402
}
387403
}
388404
}
405+
406+
& .card::after, .card::before {
407+
content: '';
408+
position: absolute;
409+
background: conic-gradient(from var(--angle), #ff4545, #00ff99, #006aff, #ff0095, #ff4545);
410+
/* background-color: blue; */
411+
width: 100%;
412+
height: 100%;
413+
top: 50%;
414+
left: 50%;
415+
transform: translate(-50%, -50%);
416+
z-index: -1;
417+
padding: 3px;
418+
border-radius: 10px;
419+
animation-name: spin;
420+
animation-duration: 3s;
421+
animation-timing-function: linear;
422+
animation-iteration-count: infinite;
423+
}
424+
425+
& .card::before {
426+
filter: blur(1.5rem);
427+
opacity: 0.5;
428+
}
389429
}
390430
}
391431
/* 主要內容 END */

0 commit comments

Comments
 (0)