chore: initialize tuhui repository
This commit is contained in:
128
frontend/src/components/Categories.css
Normal file
128
frontend/src/components/Categories.css
Normal file
@@ -0,0 +1,128 @@
|
||||
.categories {
|
||||
padding: 30px 20px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.categories-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.categories-scroll {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
overflow-x: auto;
|
||||
padding: 10px 0;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
.categories-scroll::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.category-card {
|
||||
flex-shrink: 0;
|
||||
width: 170px;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
animation: fadeInUp 0.6s ease forwards;
|
||||
animation-delay: var(--delay);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.category-card:hover {
|
||||
transform: translateY(-8px);
|
||||
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.category-image {
|
||||
height: 170px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.category-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.category-icon {
|
||||
font-size: 80px;
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.category-info {
|
||||
padding: 12px 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.category-name {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.category-count {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.scroll-btn {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
z-index: 10;
|
||||
background: white;
|
||||
border: none;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.scroll-btn:hover {
|
||||
background: #ff5a5a !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.scroll-btn-right {
|
||||
right: -10px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.category-card {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.category-image {
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user