409 lines
6.7 KiB
CSS
409 lines
6.7 KiB
CSS
/* 个人资料页面样式 */
|
|
|
|
/* 页面容器 */
|
|
#user-profile-page {
|
|
background: #f5f5f5;
|
|
min-height: 100vh;
|
|
padding-bottom: 80px;
|
|
}
|
|
|
|
/* 顶部导航 */
|
|
.header {
|
|
background: white;
|
|
padding: 15px 20px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
.header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
}
|
|
|
|
.header-left i {
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
color: #333;
|
|
transition: color 0.3s ease;
|
|
}
|
|
|
|
.header-left i:hover {
|
|
color: #ff6900;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
/* 用户头像区域 */
|
|
.profile-avatar-section {
|
|
background: white;
|
|
padding: 40px 20px;
|
|
text-align: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.avatar-container {
|
|
position: relative;
|
|
display: inline-block;
|
|
}
|
|
|
|
.user-avatar-large {
|
|
width: 100px;
|
|
height: 100px;
|
|
border-radius: 50%;
|
|
overflow: hidden;
|
|
border: 4px solid #f0f0f0;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.user-avatar-large:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.user-avatar-large img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.camera-icon {
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 0;
|
|
width: 32px;
|
|
height: 32px;
|
|
background: #ff6900;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: white;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
border: 3px solid white;
|
|
transition: background 0.3s ease;
|
|
}
|
|
|
|
.camera-icon:hover {
|
|
background: #e55a00;
|
|
}
|
|
|
|
/* 资料区域 */
|
|
.profile-section {
|
|
background: white;
|
|
margin-bottom: 20px;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.section-title {
|
|
padding: 20px 20px 10px;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
}
|
|
|
|
/* 资料项目 */
|
|
.profile-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 15px 20px;
|
|
border-bottom: 1px solid #f8f8f8;
|
|
transition: background 0.3s ease;
|
|
}
|
|
|
|
.profile-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.profile-item:hover {
|
|
background: #fafafa;
|
|
}
|
|
|
|
.item-label {
|
|
font-size: 15px;
|
|
color: #333;
|
|
min-width: 80px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.item-content {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
}
|
|
|
|
.item-value {
|
|
font-size: 15px;
|
|
color: #666;
|
|
}
|
|
|
|
.item-value.masked {
|
|
color: #999;
|
|
}
|
|
|
|
.item-status {
|
|
font-size: 13px;
|
|
padding: 2px 8px;
|
|
border-radius: 10px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.item-status.bound {
|
|
background: #e8f5e8;
|
|
color: #4CAF50;
|
|
}
|
|
|
|
.profile-item i.fa-chevron-right {
|
|
font-size: 14px;
|
|
color: #ccc;
|
|
margin-left: 10px;
|
|
}
|
|
|
|
/* 小头像 */
|
|
.mini-avatar {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
overflow: hidden;
|
|
border: 2px solid #f0f0f0;
|
|
}
|
|
|
|
.mini-avatar img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
/* 开关按钮 */
|
|
.toggle-switch {
|
|
width: 50px;
|
|
height: 28px;
|
|
background: #ddd;
|
|
border-radius: 14px;
|
|
position: relative;
|
|
cursor: pointer;
|
|
transition: background 0.3s ease;
|
|
}
|
|
|
|
.toggle-switch.active {
|
|
background: #4CAF50;
|
|
}
|
|
|
|
.toggle-slider {
|
|
width: 24px;
|
|
height: 24px;
|
|
background: white;
|
|
border-radius: 50%;
|
|
position: absolute;
|
|
top: 2px;
|
|
left: 2px;
|
|
transition: transform 0.3s ease;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.toggle-switch.active .toggle-slider {
|
|
transform: translateX(22px);
|
|
}
|
|
|
|
/* 注销登录区域 */
|
|
.logout-section {
|
|
padding: 40px 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.logout-btn {
|
|
width: 100%;
|
|
max-width: 300px;
|
|
padding: 15px;
|
|
background: white;
|
|
border: 1px solid #ddd;
|
|
border-radius: 8px;
|
|
font-size: 16px;
|
|
color: #666;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.logout-btn:hover {
|
|
background: #f5f5f5;
|
|
border-color: #ccc;
|
|
}
|
|
|
|
.logout-btn:active {
|
|
background: #eeeeee;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 480px) {
|
|
.profile-avatar-section {
|
|
padding: 30px 15px;
|
|
}
|
|
|
|
.user-avatar-large {
|
|
width: 80px;
|
|
height: 80px;
|
|
}
|
|
|
|
.camera-icon {
|
|
width: 28px;
|
|
height: 28px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.section-title {
|
|
padding: 15px 15px 8px;
|
|
font-size: 15px;
|
|
}
|
|
|
|
.profile-item {
|
|
padding: 12px 15px;
|
|
}
|
|
|
|
.item-label {
|
|
font-size: 14px;
|
|
min-width: 70px;
|
|
}
|
|
|
|
.item-value {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.mini-avatar {
|
|
width: 35px;
|
|
height: 35px;
|
|
}
|
|
|
|
.toggle-switch {
|
|
width: 45px;
|
|
height: 25px;
|
|
border-radius: 12.5px;
|
|
}
|
|
|
|
.toggle-slider {
|
|
width: 21px;
|
|
height: 21px;
|
|
}
|
|
|
|
.toggle-switch.active .toggle-slider {
|
|
transform: translateX(20px);
|
|
}
|
|
|
|
.logout-section {
|
|
padding: 30px 15px;
|
|
}
|
|
|
|
.logout-btn {
|
|
padding: 12px;
|
|
font-size: 15px;
|
|
}
|
|
}
|
|
|
|
/* 动画效果 */
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.profile-section {
|
|
animation: fadeInUp 0.6s ease-out;
|
|
}
|
|
|
|
.profile-section:nth-child(2) {
|
|
animation-delay: 0.1s;
|
|
}
|
|
|
|
.profile-section:nth-child(3) {
|
|
animation-delay: 0.2s;
|
|
}
|
|
|
|
.profile-section:nth-child(4) {
|
|
animation-delay: 0.3s;
|
|
}
|
|
|
|
.profile-avatar-section {
|
|
animation: fadeInUp 0.6s ease-out;
|
|
}
|
|
|
|
/* 点击效果 */
|
|
.profile-item:active {
|
|
background: #f0f0f0;
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
.camera-icon:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
/* 加载状态 */
|
|
.profile-item.loading {
|
|
opacity: 0.6;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.profile-item.loading::after {
|
|
content: '';
|
|
position: absolute;
|
|
right: 20px;
|
|
width: 16px;
|
|
height: 16px;
|
|
border: 2px solid #f3f3f3;
|
|
border-top: 2px solid #ff6900;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* 特殊样式 */
|
|
.profile-item:has(.fa-chevron-right) {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.profile-item:has(.fa-chevron-right):hover {
|
|
background: #f8f8f8;
|
|
}
|
|
|
|
.profile-item:has(.fa-chevron-right):hover i.fa-chevron-right {
|
|
color: #ff6900;
|
|
transform: translateX(2px);
|
|
}
|
|
|
|
/* 滚动优化 */
|
|
#user-profile-page {
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
/* 焦点状态 */
|
|
.toggle-switch:focus {
|
|
outline: 2px solid #ff6900;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.logout-btn:focus {
|
|
outline: 2px solid #ff6900;
|
|
outline-offset: 2px;
|
|
} |