写一个个人主页要求要有css
时间: 2024-05-27 07:11:09 浏览: 74
<!DOCTYPE html>
<html>
<head>
<title>My Personal Homepage</title>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
color: #333;
}
h1 {
color: #007bff;
font-size: 36px;
margin-top: 50px;
text-align: center;
}
h2 {
color: #007bff;
font-size: 24px;
margin-top: 50px;
}
p {
margin: 20px;
line-height: 1.5;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
border-radius: 10px;
margin-top: 50px;
}
.link {
display: inline-block;
padding: 10px;
background-color: #007bff;
color: #fff;
font-size: 18px;
font-weight: bold;
border-radius: 5px;
margin: 20px;
text-decoration: none;
transition: all 0.3s ease-in-out;
}
.link:hover {
background-color: #0056b3;
transform: translateY(-5px);
}
img {
max-width: 100%;
border-radius: 10px;
margin-top: 20px;
}
</style>
</head>
<body>
<h1>My Personal Homepage</h1>
<div class="container">
<h2>About Me</h2>
<p>Hi, my name is John Doe and I am a web developer. I love building websites and creating beautiful designs. I am always looking for new challenges and opportunities to learn and grow.</p>
<h2>Skills</h2>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>PHP</li>
<li>MySQL</li>
</ul>
<h2>Portfolio</h2>
<div>
<a class="link" href="#">Project 1</a>
<a class="link" href="#">Project 2</a>
<a class="link" href="#">Project 3</a>
</div>
<h2>Contact</h2>
<p>You can reach me at <a href="mailto:john@example.com">john@example.com</a></p>
<img src="https://via.placeholder.com/800x400" alt="Placeholder Image">
</div>
</body>
</html>
阅读全文