256 lines
4.6 KiB
CSS
256 lines
4.6 KiB
CSS
/* 我的有品页面样式 */
|
|
|
|
#my-youpin-page {
|
|
background-color: #f5f5f5;
|
|
min-height: 100vh;
|
|
padding-bottom: 20px;
|
|
}
|
|
|
|
/* 页面头部 */
|
|
.page-header {
|
|
background: #f6f6f6;
|
|
color: rgb(43, 42, 42);
|
|
padding: 15px 0;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.header-content {
|
|
display: flex;
|
|
align-items: center;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 0 20px;
|
|
}
|
|
|
|
.back-btn {
|
|
background: none;
|
|
border: none;
|
|
color: rgb(0, 0, 0);
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
padding: 8px;
|
|
border-radius: 50%;
|
|
transition: background-color 0.3s ease;
|
|
margin-right: 15px;
|
|
}
|
|
|
|
.back-btn:hover {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
}
|
|
|
|
/* 功能列表 */
|
|
.function-list {
|
|
background: white;
|
|
margin-bottom: 1px;
|
|
}
|
|
|
|
.function-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 18px 20px;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s ease;
|
|
min-height: 60px;
|
|
}
|
|
|
|
.function-item:hover {
|
|
background-color: #f9f9f9;
|
|
}
|
|
|
|
.function-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* 功能图标 */
|
|
.function-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-right: 15px;
|
|
position: relative;
|
|
}
|
|
|
|
.function-icon i {
|
|
font-size: 20px;
|
|
}
|
|
|
|
/* 购物车徽章 */
|
|
.cart-badge {
|
|
position: absolute;
|
|
top: -8px;
|
|
right: -8px;
|
|
background: #ff4757;
|
|
color: white;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
padding: 2px 6px;
|
|
border-radius: 10px;
|
|
min-width: 18px;
|
|
height: 18px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* 功能内容 */
|
|
.function-content {
|
|
flex: 1;
|
|
}
|
|
|
|
.function-title {
|
|
font-size: 16px;
|
|
font-weight: 400;
|
|
color: #333;
|
|
margin: 0;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* 功能操作 */
|
|
.function-action {
|
|
margin-left: 15px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.function-action i {
|
|
font-size: 14px;
|
|
color: #ccc;
|
|
}
|
|
|
|
/* 分隔线 */
|
|
.section-divider {
|
|
height: 10px;
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
/* 第一个功能列表的顶部间距 */
|
|
.function-list:first-of-type {
|
|
margin-top: 20px;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 768px) {
|
|
.header-content {
|
|
padding: 0 15px;
|
|
}
|
|
|
|
.function-item {
|
|
padding: 18px 15px;
|
|
}
|
|
|
|
.function-title {
|
|
font-size: 15px;
|
|
}
|
|
|
|
.function-icon {
|
|
margin-right: 12px;
|
|
}
|
|
|
|
.function-icon i {
|
|
font-size: 18px;
|
|
}
|
|
}
|
|
|
|
/* 动画效果 */
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.function-item {
|
|
animation: fadeInUp 0.6s ease forwards;
|
|
}
|
|
|
|
.function-item:nth-child(1) { animation-delay: 0.1s; }
|
|
.function-item:nth-child(2) { animation-delay: 0.15s; }
|
|
.function-item:nth-child(3) { animation-delay: 0.2s; }
|
|
.function-item:nth-child(4) { animation-delay: 0.25s; }
|
|
.function-item:nth-child(5) { animation-delay: 0.3s; }
|
|
.function-item:nth-child(6) { animation-delay: 0.35s; }
|
|
.function-item:nth-child(7) { animation-delay: 0.4s; }
|
|
.function-item:nth-child(8) { animation-delay: 0.45s; }
|
|
.function-item:nth-child(9) { animation-delay: 0.5s; }
|
|
.function-item:nth-child(10) { animation-delay: 0.55s; }
|
|
.function-item:nth-child(11) { animation-delay: 0.6s; }
|
|
|
|
/* 深色模式支持 */
|
|
@media (prefers-color-scheme: dark) {
|
|
#my-youpin-page {
|
|
background-color: #1a1a1a;
|
|
}
|
|
|
|
.function-list {
|
|
background: #2d2d2d;
|
|
}
|
|
|
|
.function-item {
|
|
color: white;
|
|
border-color: #404040;
|
|
}
|
|
|
|
.function-item:hover {
|
|
background-color: #404040;
|
|
}
|
|
|
|
.function-title {
|
|
color: white;
|
|
}
|
|
|
|
.function-action i {
|
|
color: #999;
|
|
}
|
|
|
|
.section-divider {
|
|
background: #1a1a1a;
|
|
}
|
|
}
|
|
|
|
/* 点击反馈效果 */
|
|
.function-item:active {
|
|
background-color: #f0f0f0;
|
|
transform: scale(0.98);
|
|
transition: all 0.1s ease;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
.function-item:active {
|
|
background-color: #404040;
|
|
}
|
|
}
|
|
|
|
/* 图标颜色统一 */
|
|
.function-icon i {
|
|
color: #4facfe !important;
|
|
}
|
|
|
|
/* 特殊处理购物车图标的徽章位置 */
|
|
.function-icon:has(.cart-badge) {
|
|
position: relative;
|
|
}
|
|
|
|
/* 确保徽章在深色模式下也可见 */
|
|
@media (prefers-color-scheme: dark) {
|
|
.cart-badge {
|
|
background: #ff4757;
|
|
color: white;
|
|
}
|
|
} |