1.html
1.html
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Business Name</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Arial', sans-serif;
}
/* Navigation */
nav {
background: #ffffff;
padding: 20px 80px;
position: fixed;
width: 100%;
z-index: 999;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 24px;
font-weight: bold;
color: #333;
}
.nav-links {
display: flex;
gap: 30px;
}
.nav-links a {
text-decoration: none;
color: #333;
font-weight: 500;
}
/* Hero Section */
.hero {
height: 100vh;
background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
url('your-hero-image.jpg');
background-size: cover;
background-position: center;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: white;
padding: 0 20px;
}
.hero-content h1 {
font-size: 48px;
margin-bottom: 20px;
}
.cta-button {
padding: 15px 30px;
background: #e74c3c;
color: white;
border: none;
border-radius: 5px;
font-size: 18px;
cursor: pointer;
transition: 0.3s;
}
/* Products Section */
.products {
padding: 80px 20px;
text-align: center;
}
.products h2 {
margin-bottom: 40px;
}
.product-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
max-width: 1200px;
margin: 0 auto;
}
.product-card {
background: #f9f9f9;
padding: 20px;
border-radius: 10px;
transition: 0.3s;
}
.product-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.product-card img {
width: 100%;
height: 200px;
object-fit: cover;
border-radius: 5px;
}
/* Footer */
footer {
background: #333;
color: white;
padding: 40px 20px;
text-align: center;
}
.nav-links {
display: none;
}
}
</style>
</head>
<body>
<!-- Navigation -->
<nav>
<div class="nav-content">
<div class="logo">Your Logo</div>
<div class="nav-links">
<a href="#home">Home</a>
<a href="#products">Products</a>
<a href="#about">About</a>
<a href="#contact">Contact</a>
</div>
</div>
</nav>
<script>
// Smooth scrolling for navigation links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Animation on scroll
window.addEventListener('scroll', function() {
const cards = document.querySelectorAll('.product-card');
cards.forEach(card => {
const cardPosition = card.getBoundingClientRect().top;
const screenPosition = window.innerHeight / 1.3;