<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My S3 Static Website</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: #333;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
background-color: #2c3e50;
color: white;
padding: 2rem;
text-align: center;
border-radius: 8px;
margin-bottom: 2rem;
}
nav {
background-color: #34495e;
padding: 1rem;
border-radius: 8px;
margin-bottom: 2rem;
}
nav ul {
list-style: none;
display: flex;
justify-content: center;
gap: 2rem;
}
nav a {
color: white;
text-decoration: none;
padding: 0.5rem 1rem;
border-radius: 4px;
transition: background-color 0.3s;
}
nav a:hover {
background-color: #2c3e50;
}
main {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin-bottom: 2rem;
}
.card {
background-color: #f8f9fa;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
footer {
text-align: center;
padding: 2rem;
background-color: #2c3e50;
color: white;
border-radius: 8px;
}
@media (max-width: 768px) {
nav ul {
flex-direction: column;
align-items: center;
gap: 1rem;
}
main {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<header>
<h1>Welcome to My Static Website</h1>
<p>Hosted on Amazon S3</p>
</header>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<main>
<div class="card">
<h2>About Us</h2>
<p>Welcome to our website! We are a company dedicated to providing excellent services to our customers.</p>
</div>
<div class="card">
<h2>Our Services</h2>
<p>We offer a wide range of services including web development, cloud solutions, and technical consulting.</p>
</div>
<div class="card">
<h2>Contact Us</h2>
<p>Email: contact@example.com<br>
Phone: (555) 123-4567<br>
Address: 123 Main St, City, Country</p>
</div>
</main>
<footer>
<p>© 2024 My Static Website. All rights reserved.</p>
</footer>
<script>
// Simple JavaScript to demonstrate interactivity
document.addEventListener('DOMContentLoaded', () => {
const cards = document.querySelectorAll('.card');
cards.forEach(card => {
card.addEventListener('mouseenter', () => {
card.style.transform = 'translateY(-5px)';
card.style.transition = 'transform 0.3s ease';
});
card.addEventListener('mouseleave', () => {
card.style.transform = 'translateY(0)';
});
});
});
</script>
</body>
</html>