为我设置一个超级炫酷个人主页(html,css,js),包含文件,图片
时间: 2024-05-06 12:17:10 浏览: 8
好的,我可以为您提供个人主页的基本架构和样式,但是文件和图片需要您自己准备。以下是一个简单的模板,您可以根据自己的需要进行修改和扩展。
HTML代码:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>个人主页</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>欢迎来到我的个人主页!</h1>
<nav>
<ul>
<li><a href="#about-me">关于我</a></li>
<li><a href="#my-skills">我的技能</a></li>
<li><a href="#my-projects">我的项目</a></li>
<li><a href="#contact-me">联系我</a></li>
</ul>
</nav>
</header>
<main>
<section id="about-me">
<h2>关于我</h2>
<p>在这里介绍一下自己。可以写一些个人经历、教育背景、兴趣爱好等等。</p>
</section>
<section id="my-skills">
<h2>我的技能</h2>
<ul>
<li>技能1</li>
<li>技能2</li>
<li>技能3</li>
<li>技能4</li>
</ul>
</section>
<section id="my-projects">
<h2>我的项目</h2>
<ul>
<li><a href="#">项目1</a></li>
<li><a href="#">项目2</a></li>
<li><a href="#">项目3</a></li>
<li><a href="#">项目4</a></li>
</ul>
</section>
<section id="contact-me">
<h2>联系我</h2>
<form>
<label for="name">姓名:</label>
<input type="text" id="name" name="name"><br>
<label for="email">邮箱:</label>
<input type="email" id="email" name="email"><br>
<label for="message">留言:</label>
<textarea id="message" name="message"></textarea><br>
<input type="submit" value="发送">
</form>
</section>
</main>
<footer>
<p>版权所有 © 2021 个人主页 </p>
</footer>
</body>
</html>
```
CSS代码:
```css
/* 全局样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
/* 头部导航栏样式 */
header {
background-color: #333;
color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
}
nav ul {
list-style: none;
display: flex;
}
nav li {
margin-right: 20px;
}
nav a {
color: #fff;
text-decoration: none;
}
nav a:hover {
text-decoration: underline;
}
/* 主要内容样式 */
main {
max-width: 800px;
margin: 0 auto;
padding: 50px 20px;
}
section {
margin-bottom: 50px;
}
h2 {
font-size: 24px;
margin-bottom: 20px;
}
ul {
list-style: none;
}
ul li {
margin-bottom: 10px;
}
a {
color: #333;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
form label {
display: block;
margin-bottom: 10px;
}
form input[type="text"],
form input[type="email"],
form textarea {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
form input[type="submit"] {
background-color: #333;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
}
form input[type="submit"]:hover {
background-color: #555;
}
```
JS代码:
```javascript
// 这里可以添加一些交互效果或者动态加载内容
// 但是基本的个人主页不需要太多的js代码
```