This commit is contained in:
oneao committed 2025-10-08 19:41:13 +08:00
1 parent b03e2c1e69
commit 8770e4fddc
9 files changed
+217 -116

No files matched your search

+115 -79
View File
@@ -1,92 +1,128 @@
<!DOCTYPE html>
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>个人中心</title>
<style>
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: #f4f5f7;
color: #333;
}
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>个人中心</title>
<style>
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background: #f2f3f5;
color: #2c3e50;
}
.header {
background: linear-gradient(135deg, #2f3e46, #354f52);
color: white;
padding: 20px;
}
.profile-container {
max-width: 420px;
margin: 20px auto;
padding: 16px;
}
.header h2 {
margin: 0 0 6px;
font-size: 18px;
font-weight: 600;
}
/* 用户信息头部 */
.profile-header {
display: flex;
align-items: center;
background: #fff;
padding: 16px;
border: 1px solid #dfe4ea;
border-radius: 4px; /* 小圆角,偏工业 */
}
.header p {
margin: 4px 0;
font-size: 14px;
color: #d9d9d9;
}
.avatar {
width: 70px;
height: 70px;
background: #95a5a6;
color: #fff;
font-size: 28px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16px;
}
.list {
margin: 16px;
background: #fff;
border-radius: 10px;
box-shadow: 0 2px 6px rgba(0,0,0,0.05);
overflow: hidden;
}
.user-info {
display: flex;
flex-direction: column;
justify-content: center;
}
.list-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 14px 16px;
font-size: 15px;
border-bottom: 1px solid #eee;
cursor: pointer;
}
.user-name {
font-size: 18px;
font-weight: 600;
margin-bottom: 6px;
color: #2c3e50;
}
.list-item:last-child {
border-bottom: none;
}
.status {
display: flex;
align-items: center;
font-size: 14px;
color: #2c3e50;
}
.list-item span {
color: #666;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 6px;
background-color: #27ae60; /* 在线:绿色 */
}
.list-item.danger {
color: #d9534f;
font-weight: 500;
}
/* 下方信息块 */
.info-list {
margin-top: 20px;
background: #fff;
border: 1px solid #dfe4ea;
border-radius: 4px;
}
.footer {
text-align: center;
padding: 12px;
font-size: 12px;
color: #aaa;
}
</style>
</head>
<body>
<div class="header">
<h2>个人中心</h2>
<p>机构码:123456</p>
<p>账户:zhangsan</p>
</div>
.info-item {
display: flex;
justify-content: space-between;
padding: 14px 16px;
font-size: 15px;
border-bottom: 1px solid #e0e0e0;
}
<div class="list">
<div class="list-item">
<span>修改密码</span>
.info-item:last-child {
border-bottom: none;
}
.info-label {
color: #7f8c8d;
}
.info-value {
font-weight: 500;
color: #2c3e50;
}
</style>
</head>
<body>
<div class="profile-container">
<!-- 顶部用户信息 -->
<div class="profile-header">
<div class="avatar">U</div>
<div class="user-info">
<div class="user-name">张三</div>
<div class="status">
<div class="status-dot"></div>
在线
</div>
</div>
</div>
<!-- 下方账号和机构码 -->
<div class="info-list">
<div class="info-item">
<span class="info-label">账号</span>
<span class="info-value">zhangsan</span>
</div>
<div class="info-item">
<span class="info-label">机构码</span>
<span class="info-value">123456</span>
</div>
</div>
</div>
<div class="list-item danger">
<span>退出登录</span>
</div>
</div>
<div class="footer">
© 2025 MyApp
</div>
</body>
</body>
</html>