一个简洁美观的个人主页,可以轻松部署到 GitHub Pages。
my-portfolio/
├── index.html # 主页面
├── style.css # 样式文件
├── script.js # 交互脚本
└── README.md # 说明文档
-
创建 GitHub 仓库
- 登录 GitHub
- 点击右上角
+→New repository - 仓库名称填写
你的用户名.github.io(例如:john.github.io) - 选择
Public - 点击
Create repository
-
上传文件
cd my-portfolio git init git add . git commit -m "Initial commit" git branch -M main git remote add origin https://github.com/你的用户名/你的用户名.github.io.git git push -u origin main
-
访问网站
- 等待约 1-2 分钟
- 访问
https://你的用户名.github.io
-
创建任意名称的仓库(例如:
my-portfolio) -
上传文件
cd my-portfolio git init git add . git commit -m "Initial commit" git branch -M main git remote add origin https://github.com/你的用户名/my-portfolio.git git push -u origin main
-
启用 GitHub Pages
- 进入仓库 →
Settings→Pages - Source 选择
Deploy from a branch - Branch 选择
main和/ (root) - 点击
Save
- 进入仓库 →
-
访问网站
- 等待约 1-2 分钟
- 访问
https://你的用户名.github.io/my-portfolio
- 📱 响应式设计,适配手机和桌面
- 🎨 现代渐变配色
- ✨ 滚动动画效果
- 🔗 平滑滚动导航
- 💫 悬停交互效果
编辑 index.html 中的文字内容:
- 修改 "开发者" 为你的名字
- 更新 "关于我" 部分的描述
- 替换联系方式邮箱和链接
编辑 style.css 中的 CSS 变量:
:root {
--primary-color: #667eea; /* 主色调 */
--secondary-color: #764ba2; /* 次要色调 */
}在 index.html 的 projects-grid 中复制一个 project-card 并修改内容。
MIT License - 可自由使用和修改