给我一个html精美的个人主页
时间: 2023-12-14 15:04:12 浏览: 113
一款很好看的个人主页
很高兴为您提供一个html精美的个人主页的示例代码,您可以根据自己的需求和喜好进行修改和定制。
```html
<!DOCTYPE html>
<html>
<head>
<title>个人主页</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #f1f1f1;
}
.container {
max-width: 1100px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
border-radius: 10px;
overflow: hidden;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
}
.logo {
font-size: 24px;
font-weight: bold;
color: #333;
text-decoration: none;
}
.navigation {
display: flex;
align-items: center;
}
.navigation a {
margin-left: 20px;
font-size: 16px;
color: #333;
text-decoration: none;
}
.navigation a:hover {
color: #f00;
}
.hero {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 60px;
}
.hero-text {
flex: 1;
max-width: 400px;
}
.hero-title {
font-size: 48px;
font-weight: bold;
color: #333;
margin-bottom: 20px;
}
.hero-description {
font-size: 24px;
color: #666;
line-height: 1.5;
margin-bottom: 40px;
}
.hero-button {
display: inline-block;
padding: 10px 20px;
background-color: #f00;
color: #fff;
font-size: 16px;
font-weight: bold;
text-decoration: none;
border-radius: 5px;
transition: all 0.3s ease;
}
.hero-button:hover {
background-color: #fff;
color: #f00;
border: 2px solid #f00;
}
.featured {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 60px;
}
.featured-text {
flex: 1;
max-width: 400px;
}
.featured-title {
font-size: 36px;
font-weight: bold;
color: #333;
margin-bottom: 20px;
}
.featured-description {
font-size: 20px;
color: #666;
line-height: 1.5;
margin-bottom: 40px;
}
.featured-image {
flex: 1;
max-width: 400px;
margin-left: 40px;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.featured-image img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
.footer {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 40px;
padding-bottom: 20px;
font-size: 16px;
color: #666;
border-top: 1px solid #ccc;
}
.footer a {
color: #666;
text-decoration: none;
}
.footer a:hover {
color: #f00;
}
</style>
</head>
<body>
<div class="container">
<header class="header">
<a href="#" class="logo">个人主页</a>
<nav class="navigation">
<a href="#">首页</a>
<a href="#">关于我</a>
<a href="#">联系我</a>
</nav>
</header>
<section class="hero">
<div class="hero-text">
<h1 class="hero-title">欢迎来到我的个人主页</h1>
<p class="hero-description">我是一名程序员,热爱开发各种有趣的应用,喜欢探索新技术,欢迎来了解我和我的作品。</p>
<a href="#" class="hero-button">了解更多</a>
</div>
<div class="hero-image">
<img src="https://picsum.photos/600/400" alt="Hero Image">
</div>
</section>
<section class="featured">
<div class="featured-text">
<h2 class="featured-title">我的作品</h2>
<p class="featured-description">以下是我开发的一些应用,欢迎来尝试。</p>
</div>
<div class="featured-image">
<img src="https://picsum.photos/600/400" alt="Featured Image">
</div>
</section>
<footer class="footer">
<p>版权所有 © 2021</p>
<nav class="navigation">
<a href="#">首页</a>
<a href="#">关于我</a>
<a href="#">联系我</a>
</nav>
</footer>
</div>
</body>
</html>
```
这是一个基本的模板,包含了页面的头部、导航、主要内容和页脚。您可以根据自己的需求和喜好进行修改和定制,例如更换图片、调整颜色、添加新的内容等等。祝您顺利完成您的个人主页!
阅读全文