Happy Birthday, My Love!

by MD Hasan Patwary

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Happy Birthday, Love!</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <header>
        <h1>Happy Birthday, My Love!</h1>
    </header>

    <section class="quote">
        <p class="quote-message">"You are my today and all of my tomorrows." - Leo Christopher</p>
        <p class="quote-message">"I love you not only for what you are, but for what I am when I am with you." - Roy Croft</p>
        <p class="quote-message">"You are the finest, loveliest, tenderest, and most beautiful person I have ever known—and even that is an understatement." - F. Scott Fitzgerald</p>
    </section>

    <section class="gallery">
        <h2>Memorable Moments</h2>
        <div class="photo-grid">
            <img src="https://images.pexels.com/photos/3184430/pexels-photo-3184430.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" alt="Memorable Moment 1">
            <img src="https://images.pexels.com/photos/301920/pexels-photo-301920.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" alt="Memorable Moment 2">
            <img src="https://images.pexels.com/photos/1128317/pexels-photo-1128317.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" alt="Memorable Moment 3">
            <img src="https://images.pexels.com/photos/1449051/pexels-photo-1449051.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" alt="Memorable Moment 4">
            <img src="https://images.pexels.com/photos/235990/pexels-photo-235990.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" alt="Memorable Moment 5">
            <img src="https://images.pexels.com/photos/936611/pexels-photo-936611.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" alt="Memorable Moment 6">
        </div>
    </section>

    <section class="calendar">
        <h2>Your Special Day</h2>
        <div class="calendar-wrapper">
            <div...

CSS

body {
    font-family: 'Arial', sans-serif;
    background: url('https://images.pexels.com/photos/1128317/pexels-photo-1128317.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260') no-repeat center center fixed;
    background-size: cover;
    color: #333;
    margin: 0;
    padding: 0;
    text-align: center;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

header {
    background-color: rgba(255, 111, 97, 0.8);
    color: white;
    padding: 20px 0;
    animation: slideDown 1s ease-in-out;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    animation: fadeIn 2s ease-in-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quote {
    margin: 30px 0;
    font-size: 1.5em;
    color: #ff6f61;
    position: relative;
    height: 50px;
    animation: fadeIn 2s ease-in-out;
}

.quote-message {
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.quote-message.active {
    opacity: 1;
}

.gallery {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    width: 80%;
    border-radius: 10px;
}

.gallery h2 {
    margin-bottom: 20px;
    animation: fadeIn 2s ease-in-out;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

@media (max-width: 600px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.photo-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.calendar {
    margin: 20px auto;
    width: 80%;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0,...

JavaScript

const quotes = document.querySelectorAll('.quote-message');
let currentQuote = 0;

function showNextQuote() {
    quotes[currentQuote].classList.remove('active');
    currentQuote = (currentQuote + 1) % quotes.length;
    quotes[currentQuote].classList.add('active');
}

setInterval(showNextQuote, 5000);

window.addEventListener('scroll', function() {
    const fadeInElements = document.querySelectorAll('.fade-in');
    fadeInElements.forEach(element => {
        const position = element.getBoundingClientRect().top;
        const windowHeight = window.innerHeight;
        if (position < windowHeight - 100) {
            element.classList.add('visible');
        }
    });
});