feat: 分类页骨架屏优化
This commit is contained in:
@@ -70,9 +70,10 @@
|
||||
|
||||
.cat-sidebar__item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
padding: 24rpx 12rpx;
|
||||
margin: 4rpx 12rpx;
|
||||
border-radius: 999rpx;
|
||||
@@ -86,7 +87,7 @@
|
||||
}
|
||||
|
||||
.cat-sidebar__icon {
|
||||
font-size: 36rpx;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
@@ -263,35 +264,47 @@
|
||||
color: @text-gray;
|
||||
}
|
||||
|
||||
// ── Skeleton ──
|
||||
@keyframes skeleton-pulse {
|
||||
0% {
|
||||
opacity: 0.6;
|
||||
}
|
||||
// ── Skeleton shimmer ──
|
||||
@skeleton-base: #e8e2d5;
|
||||
|
||||
50% {
|
||||
opacity: 0.3;
|
||||
@keyframes skeleton-shimmer {
|
||||
0% {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0.6;
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
|
||||
.cat-card--skeleton {
|
||||
pointer-events: none;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(135deg,
|
||||
transparent 25%,
|
||||
rgba(255, 255, 255, 0.7) 50%,
|
||||
transparent 75%);
|
||||
animation: skeleton-shimmer 1.2s linear infinite;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.cat-card__thumb {
|
||||
background: #e8e2d5;
|
||||
animation: skeleton-pulse 1.5s ease-in-out infinite;
|
||||
background: @skeleton-base;
|
||||
}
|
||||
|
||||
.cat-card__title,
|
||||
.cat-card__subtitle {
|
||||
background: #e8e2d5;
|
||||
background: @skeleton-base;
|
||||
border-radius: 8rpx;
|
||||
color: transparent;
|
||||
animation: skeleton-pulse 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.cat-card__title {
|
||||
|
||||
Reference in New Issue
Block a user