You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

166 lines
4.6 KiB

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>图标样式测试</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<style>
/* 模拟主题变量 */
:root {
--accent-color: #1976d2;
--text-primary: #333333;
}
.theme-dark {
--accent-color: #ffffff;
--text-primary: #ffffff;
}
/* 图标样式 */
.page-header h2 i,
.profile-header h1 i,
.card-header h2 i,
.settings-section h3 i {
margin-right: 8px;
color: var(--accent-color);
font-size: 0.9em;
}
/* 页面样式 */
body {
font-family: Arial, sans-serif;
margin: 20px;
background: #f5f5f5;
}
.theme-dark {
background: #2d4a8a;
color: white;
}
.test-container {
max-width: 800px;
margin: 0 auto;
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.theme-dark .test-container {
background: rgba(255, 255, 255, 0.08);
}
.page-header {
text-align: center;
margin-bottom: 30px;
}
.page-header h2 {
font-size: 16px;
color: var(--text-primary);
margin: 0;
}
.settings-section {
margin-bottom: 20px;
padding: 20px;
border: 1px solid #e0e0e0;
border-radius: 8px;
}
.theme-dark .settings-section {
border-color: rgba(255, 255, 255, 0.2);
}
.settings-section h3 {
font-size: 14px;
color: var(--text-primary);
margin: 0 0 16px 0;
border-bottom: 2px solid #e0e0e0;
padding-bottom: 8px;
}
.theme-dark .settings-section h3 {
border-bottom-color: rgba(255, 255, 255, 0.2);
}
.theme-toggle {
position: fixed;
top: 20px;
right: 20px;
padding: 10px 20px;
background: #1976d2;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
.theme-toggle:hover {
background: #1565c0;
}
</style>
</head>
<body>
<button class="theme-toggle" onclick="toggleTheme()">切换主题</button>
<div class="test-container">
<div class="page-header">
<h2><i class="fas fa-user"></i> 个人资料</h2>
</div>
<div class="settings-section">
<h3><i class="fas fa-info-circle"></i> 基本信息</h3>
<p>这是基本信息部分的内容</p>
</div>
<div class="settings-section">
<h3><i class="fas fa-lock"></i> 登录信息</h3>
<p>这是登录信息部分的内容</p>
</div>
<div class="settings-section">
<h3><i class="fas fa-crown"></i> 角色信息</h3>
<p>这是角色信息部分的内容</p>
</div>
<div class="settings-section">
<h3><i class="fas fa-cog"></i> 用户设置</h3>
<p>这是用户设置部分的内容</p>
</div>
<div class="settings-section">
<h3><i class="fas fa-user-cog"></i> 个人偏好</h3>
<p>这是个人偏好部分的内容</p>
</div>
<div class="settings-section">
<h3><i class="fas fa-tools"></i> 应用设置</h3>
<p>这是应用设置部分的内容</p>
</div>
<div class="settings-section">
<h3><i class="fas fa-user-shield"></i> 用户设置</h3>
<p>这是用户设置部分的内容</p>
</div>
<div class="settings-section">
<h3><i class="fas fa-bell"></i> 通知偏好</h3>
<p>这是通知偏好部分的内容</p>
</div>
<div class="settings-section">
<h3><i class="fas fa-database"></i> 数据管理</h3>
<p>这是数据管理部分的内容</p>
</div>
</div>
<script>
function toggleTheme() {
document.body.classList.toggle('theme-dark');
}
</script>
</body>
</html>