<!DOCTYPE html>
<html>
<head>
<title>大学生就业网站</title>
<style>
/* Reset default margin and padding */
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Set default font family and size */
body {
font-family: Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
}
/* Header styles */
header {
background-color: #333;
color: #fff;
padding: 20px;
}
header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
}
header nav {
display: flex;
justify-content: space-between;
align-items: center;
}
header nav ul {
display: flex;
list-style: none;
}
header nav ul li {
margin-left: 20px;
}
header nav ul li a {
color: #fff;
text-decoration: none;
transition: color 0.3s ease;
}
header nav ul li a:hover {
color: #ddd;
}
/* Banner styles */
.banner {
position: relative;
height: 400px;
background-image: url('https://via.placeholder.com/1500x400');
background-position: center;
background-size: cover;
}
.banner::before {
content: '';
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.3);
}
.banner-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #fff;
font-size: 2rem;
letter-spacing: 2px;
text-shadow: 1px 1px #333;
}
/* Main content styles */
.main {
margin: 40px auto;
max-width: 1200px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.card {
width: calc(33.33% - 10px);
margin-bottom: 20px;
background-color: #f9f9f9;
border: 1px solid #ddd;
transition: transform 0.3s ease;
}
.card:hover {
transform: translateY(-5px);
}
.card img {
width: 100%;
height: 200px;
object-fit: cover;
}
.card h2 {
font-size: 1.5rem;
margin: 10px;
}
.card p {
font-size: 1rem;
margin: 10px;
}
/* Footer styles */
footer {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
footer p {
margin-bottom: 10px;
}
footer a {
color: #fff;
text-decoration: none;
transition: color 0.3s ease;
}
footer a:hover {
color: #ddd;
}
/* Animation styles */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.fade-in {
animation: fadeIn 1s ease;
}
@keyframes slideInLeft {
from { transform: translateX(-100%); }
to { transform: translateX(0); }
}
.slide-in-left {
animation: slideInLeft 1s ease;
}
@keyframes slideInRight {
from { transform: translateX(100%); }
to { transform: translateX(0); }
}
.slide-in-right {
animation: slideInRight 1s ease;
}
</style>
</head>
<body>
<header>
<nav>
<h1>大学生就业网站</h1>
<ul>
<li><a href="#">首页</a></li>
<li><a href="#">职位列表</a></li>
<li><a href="#">公司列表</a></li>
<li><a href="#">联系我们</a></li>
</ul>
</nav>
</header>
<div class="banner">
<div class="banner-text fade-in">
<h2>欢迎来到大学生就业网站</h2>
<p>找到属于你的职业</p>
</div>
</div>
<main class="main">
<div class="card slide-in-left">
<img src="https://via.placeholder.com/400x200" alt="Company Logo">
<h2>公司名称</h2>
<p>公司介绍公司介绍公司介绍公司介绍公司介绍公司介绍</p>
</div>
<div class="card slide-in-right">
<img src="https://via.placeholder.com/400x200" alt="Company Logo">
<h2>公司名称</h2>
<p>公司介绍公司介绍公司介绍公司介绍公司介绍公司介绍</p>
</div>
<div class="card slide-in-left">
<img src="https://via.placeholder.com/400x200" alt="Company Logo">
<h2>公司名称</h2>
<p>公司介绍公司介绍公司介绍公司介绍公司介绍公司介绍</p>
</div>
<div class="card slide-in-right">
<img src="https://via.placeholder.com/400x200" alt="Company Logo">
<h2>公司名称</h2>
<p>公司介绍公司介绍公司介绍公司介绍公司介绍公司介绍</p>
</div>
<div class="card slide-in-left">
<img src="https://via.placeholder.com/400x200" alt="Company Logo">
<h2>公司名称</h2>
<p>公司介绍公司介绍公司介绍公司介绍公司介绍公司介绍</p>
</div>
<div class="card slide-in-right">
<img src="https://via.placeholder.com/400x200" alt="Company Logo">
<h2>公司名称</h2>
<p>公司介绍公司介绍公司介绍公司介绍公司介绍公司介绍</p>
</div>
</main>
<footer>
<p>© 2021 大学生就业网站</p>
<p><a href="#">隐私政策</a> | <a href="#">使用条款</a></p>
</footer>
</body>
</html>
效果图: