4. 旅行网站
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Travel Agency</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f8f9fa;
}
header {
background: #343a40;
color: #fff;
padding: 20px;
text-align: center;
}
nav {
background: #495057;
padding: 10px;
text-align: center;
}
nav a {
color: #fff;
text-decoration: none;
padding: 10px 20px;
}
.container {
width: 80%;
margin: 20px auto;
overflow: hidden;
}
.destination {
float: left;
width: 30%;
margin: 1.5%;
background: #fff;
border-radius: 5px;
padding: 15px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.destination img {
width: 100%;
border-radius: 5px;
}
footer {
background: #343a40;
color: #fff;
text-align: center;
padding: 10px 0;
position: fixed;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<header>
<h1>Explore the World with Our Travel Agency</h1>
</header>
<nav>
<a href="#">Home</a>
<a href="#">Destinations</a>
<a href="#">Deals</a>
<a href="#">Contact</a>
</nav>
<div class="container">
<div class="destination">
<img src="destination1.jpg" alt="Destination 1">
<h2>Paris</h2>
<p>Experience the romance of Paris with our exclusive tour packages.</p>
</div>
<div class="destination">
<img src="destination2.jpg" alt="Destination 2">
<h2>New York</h2>
<p>Discover the vibrant culture and iconic landmarks of New York City.</p>
</div>
<div class="destination">
<img src="destination3.jpg" alt="Destination 3">
<h2>Tokyo</h2>
<p>Immerse yourself in the unique blend of tradition and modernity in Tokyo.</p>
</div>
</div>
<footer>
<p>© 2024 Travel Agency</p>
</footer>
</body>
</html>