<!
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
>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Microsoft YaHei', sans-serif;
}
body {
min-height: 100vh;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 20px;
background-size: cover;
background-position: center;
background-attachment: fixed;
}
.container {
width: 100%;
max-width: 1200px;
display: flex;
flex-direction: column;
align-items: center;
}
header {
text-align: center;
margin-bottom: 30px;
width: 100%;
}
.avatar {
width: 120px;
height: 120px;
border-radius: 50%;
object-fit: cover;
border: 3px solid rgba(255, 255, 255, 0.3);
margin-bottom: 20px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
h1 {
color: white;
font-size: 2.2rem;
margin-bottom: 10px;
text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.description {
color: rgba(255, 255, 255, 0.8);
font-size: 1.1rem;
max-width: 600px;
margin: 0 auto;
line-height: 1.6;
}
.nav-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 20px;
width: 100%;
margin-top: 30px;
}
.nav-item {
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-radius: 15px;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
text-decoration: none;
transition: all 0.3s ease;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
border: 1px solid rgba(255, 255, 255, 0.3);
cursor: pointer;
user-select: none;
}
.nav-item:hover {
transform: translateY(-5px);
background: rgba(255, 255, 255, 0.3);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
/* 弹窗样式 */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.modal-overlay.active {
opacity: 1;
visibility: visible;
}
.modal-content {
background: rgba(255, 255, 255, 0.25);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
border-radius: 20px;
padding: 30px;
width: 90%;
max-width: 500px;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.4);
transform: translateY(20px);
transition: all 0.3s ease;
}
.modal-overlay.active .modal-content {
transform: translateY(0);
}
.modal-header {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.modal-icon {
width: 40px;
height: 40px;
margin-right: 15px;
}
.modal-title {
color: white;
font-size: 1.5rem;
font-weight: bold;
}
.modal-close {
position: absolute;
top: 15px;
right: 15px;
background: none;
border: none;
color: rgba(255, 255, 255, 0.7);
font-size: 1.5rem;
cursor: pointer;
transition: all 0.2s ease;
}
.modal-close:hover {
color: white;
transform: rotate(90deg);
}
.modal-links {
display: grid;
grid-template-columns: 1fr;
gap: 10px;
}
.modal-link {
display: block;
padding: 12px 20px;
background: rgba(255, 255, 255, 0.15);
border-radius: 10px;
color: white;
text-decoration: none;
transition: all 0.2s ease;
text-align: center;
}
.modal-link:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateX(5px);
}
.nav-icon {
width: 50px;
height: 50px;
margin-bottom: 15px;
object-fit: contain;
}
.nav-title {
color: white;
font-size: 1.2rem;
font-weight: bold;
margin-bottom: 8px;
text-align: center;
}
.nav-desc {
color: rgba(255, 255, 255, 0.8);
font-size: 0.9rem;
text-align: center;
line-height: 1.4;
}
footer {
margin-top: 50px;
color: rgba(255, 255, 255, 0.6);
font-size: 0.9rem;
text-align: center;
}
[url=home.php?mod=space&uid=945662]@media[/url] (max-width: 768px) {
.nav-grid {
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
h1 {
font-size: 1.8rem;
}
.description {
font-size: 1rem;
}
.modal-content {
padding: 20px;
width: 95%;
}
}
</
style
>
</
head
>
<
body
>
<
div
class
=
"container"
>
<
header
>
<
img
src
=
"https://via.placeholder.com/120"
alt
=
"头像"
class
=
"avatar"
>
<
h1
>我的个人导航</
h1
>
<
p
class
=
"description"
>这里是我的个人导航页面,收集了我常用的网站和工具,方便快速访问。</
p
>
</
header
>
<
div
class
=
"nav-grid"
>
<
div
class
=
"nav-item"
onclick="openModal('GitHub', 'https://cdn.jsdelivr.net/gh/devicons/devicon/icons/github/github-original.svg', '代码托管平台', [
{name: 'GitHub主页', url: 'https://github.com'},
{name: '趋势项目', url: 'https://github.com/trending'},
{name: '探索', url: 'https://github.com/explore'},
{name: '市场', url: 'https://github.com/marketplace'}
])">
<
img
src
=
"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/github/github-original.svg"
alt
=
"GitHub"
class
=
"nav-icon"
>
<
h3
class
=
"nav-title"
>GitHub</
h3
>
<
p
class
=
"nav-desc"
>代码托管平台</
p
>
</
div
>
<
div
class
=
"nav-item"
onclick="openModal('Stack Overflow', 'https://cdn.jsdelivr.net/gh/devicons/devicon/icons/stackoverflow/stackoverflow-original.svg', '开发者问答社区', [
{name: '首页', url: 'https://stackoverflow.com'},
{name: '问题', url: 'https://stackoverflow.com/questions'},
{name: '标签', url: 'https://stackoverflow.com/tags'},
{name: '用户', url: 'https://stackoverflow.com/users'}
])">
<
img
src
=
"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/stackoverflow/stackoverflow-original.svg"
alt
=
"Stack Overflow"
class
=
"nav-icon"
>
<
h3
class
=
"nav-title"
>Stack Overflow</
h3
>
<
p
class
=
"nav-desc"
>开发者问答社区</
p
>
</
div
>
<
div
class
=
"nav-item"
onclick="openModal('LeetCode', 'https://cdn.jsdelivr.net/gh/devicons/devicon/icons/leetcode/leetcode-original.svg', '算法练习平台', [
{name: '题库', url: 'https://leetcode.com'},
{name: '竞赛', url: 'https://leetcode.com/contest'},
{name: '讨论', url: 'https://leetcode.com/discuss'},
{name: '学习', url: 'https://leetcode.com/explore'}
])">
<
img
src
=
"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/leetcode/leetcode-original.svg"
alt
=
"LeetCode"
class
=
"nav-icon"
>
<
h3
class
=
"nav-title"
>LeetCode</
h3
>
<
p
class
=
"nav-desc"
>算法练习平台</
p
>
</
div
>
<
div
class
=
"nav-item"
onclick="openModal('YouTube', 'https://cdn.jsdelivr.net/gh/devicons/devicon/icons/youtube/youtube-original.svg', '视频分享平台', [
{name: '首页', url: 'https://www.youtube.com'},
{name: '趋势', url: 'https://www.youtube.com/feed/trending'},
{name: '订阅', url: 'https://www.youtube.com/feed/subscriptions'},
{name: '历史', url: 'https://www.youtube.com/feed/history'}
])">
<
img
src
=
"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/youtube/youtube-original.svg"
alt
=
"YouTube"
class
=
"nav-icon"
>
<
h3
class
=
"nav-title"
>YouTube</
h3
>
<
p
class
=
"nav-desc"
>视频分享平台</
p
>
</
div
>
<
div
class
=
"nav-item"
onclick="openModal('Twitter', 'https://cdn.jsdelivr.net/gh/devicons/devicon/icons/twitter/twitter-original.svg', '社交媒体平台', [
{name: '首页', url: 'https://twitter.com'},
{name: '探索', url: 'https://twitter.com/explore'},
{name: '通知', url: 'https://twitter.com/notifications'},
{name: '消息', url: 'https://twitter.com/messages'}
])">
<
img
src
=
"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/twitter/twitter-original.svg"
alt
=
"Twitter"
class
=
"nav-icon"
>
<
h3
class
=
"nav-title"
>Twitter</
h3
>
<
p
class
=
"nav-desc"
>社交媒体平台</
p
>
</
div
>
<
div
class
=
"nav-item"
onclick="openModal('知乎', 'https://static.zhihu.com/heifetz/favicon.ico', '问答社区', [
{name: '首页', url: 'https://www.zhihu.com'},
{name: '发现', url: 'https://www.zhihu.com/explore'},
{name: '热榜', url: 'https://www.zhihu.com/hot'},
{name: '关注', url: 'https://www.zhihu.com/follow'}
])">
<
img
src
=
"https://static.zhihu.com/heifetz/favicon.ico"
alt
=
"知乎"
class
=
"nav-icon"
>
<
h3
class
=
"nav-title"
>知乎</
h3
>
<
p
class
=
"nav-desc"
>问答社区</
p
>
</
div
>
<
div
class
=
"nav-item"
onclick="openModal('哔哩哔哩', 'https://www.bilibili.com/favicon.ico', '视频弹幕网站', [
{name: '首页', url: 'https://www.bilibili.com'},
{name: '热门', url: 'https://www.bilibili.com/v/popular'},
{name: '动画', url: 'https://www.bilibili.com/v/douga'},
{name: '游戏', url: 'https://www.bilibili.com/v/game'}
])">
<
img
src
=
"https://www.bilibili.com/favicon.ico"
alt
=
"哔哩哔哩"
class
=
"nav-icon"
>
<
h3
class
=
"nav-title"
>哔哩哔哩</
h3
>
<
p
class
=
"nav-desc"
>视频弹幕网站</
p
>
</
div
>
<
div
class
=
"nav-item"
onclick="openModal('Gmail', 'https://cdn.jsdelivr.net/gh/devicons/devicon/icons/google/google-original.svg', '电子邮件服务', [
{name: '收件箱', url: 'https://mail.google.com'},
{name: '星标', url: 'https://mail.google.com/mail/u/0/#starred'},
{name: '已发送', url: 'https://mail.google.com/mail/u/0/#sent'},
{name: '草稿', url: 'https://mail.google.com/mail/u/0/#drafts'}
])">
<
img
src
=
"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/google/google-original.svg"
alt
=
"Gmail"
class
=
"nav-icon"
>
<
h3
class
=
"nav-title"
>Gmail</
h3
>
<
p
class
=
"nav-desc"
>电子邮件服务</
p
>
</
div
>
</
div
>
<
footer
>
<
p
>© 2025 我的个人导航 | 使用HTML和CSS构建</
p
>
</
footer
>
</
div
>
<
div
class
=
"modal-overlay"
id
=
"modalOverlay"
>
<
div
class
=
"modal-content"
>
<
button
class
=
"modal-close"
onclick
=
"closeModal()"
>×</
button
>
<
div
class
=
"modal-header"
>
<
img
src
=
""
alt
=
"图标"
class
=
"modal-icon"
id
=
"modalIcon"
>
<
h2
class
=
"modal-title"
id
=
"modalTitle"
></
h2
>
</
div
>
<
p
class
=
"nav-desc"
id
=
"modalDesc"
></
p
>
<
div
class
=
"modal-links"
id
=
"modalLinks"
>
</
div
>
</
div
>
</
div
>
<
script
>
// 打开弹窗函数
function openModal(title, icon, desc, links) {
const modal = document.getElementById('modalOverlay');
const modalTitle = document.getElementById('modalTitle');
const modalIcon = document.getElementById('modalIcon');
const modalDesc = document.getElementById('modalDesc');
const modalLinks = document.getElementById('modalLinks');
// 设置弹窗内容
modalTitle.textContent = title;
modalIcon.src = icon;
modalDesc.textContent = desc;
// 生成链接
modalLinks.innerHTML = '';
links.forEach(link => {
const a = document.createElement('a');
a.href = link.url;
a.target = '_blank';
a.className = 'modal-link';
a.textContent = link.name;
modalLinks.appendChild(a);
});
// 显示弹窗
modal.classList.add('active');
document.body.style.overflow = 'hidden'; // 禁止页面滚动
}
// 关闭弹窗函数
function closeModal() {
const modal = document.getElementById('modalOverlay');
modal.classList.remove('active');
document.body.style.overflow = ''; // 恢复页面滚动
}
// 点击弹窗外部关闭弹窗
document.getElementById('modalOverlay').addEventListener('click', function(e) {
if (e.target === this) {
closeModal();
}
});
// ESC键关闭弹窗
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape') {
closeModal();
}
});
</
script
>
</
body
>
</
html
>