Subscribe Our Channel

header ads

Search This Blog

Showing posts with label java script. Show all posts
Showing posts with label java script. Show all posts

Saturday, August 1, 2026

Happy Maha Shivratri Greeting Card Animated Pure HTML & CSS Page

Happy Maha Shivratri Greeting Card Animated Pure HTML & CSS Page



In this step-by-step tutorial, learn how to build an animated Happy Maha Shivratri Greeting Card using 100% Pure HTML5 and CSS3—completely without JavaScript, external image assets, or third-party links!

ЁЯМЯ Key Project Features:

  • Dynamic Tricolor Gradient Background: Uses a continuous CSS linear gradient animation (@keyframes gradientShift) that shifts seamlessly between saffron, white, and green tones.

  • Pulsing Glowing Om (реР) Centerpiece: Styled with multi-layered CSS drop-shadows and breathing scale transformations to create a spiritual glow.

  • Glassmorphism Dark Card: Features a semi-transparent backdrop (rgba), gold dashed border accents, and high-contrast typography.

  • Gold Gradient Text & Badge: Uses background text clipping (-webkit-background-clip: text) for gold metallic headings alongside a clean || реР рдирдоः рд╢िрд╡ाрдп || mantra badge.

  • 100% Offline & Pure CSS: Single-file code requiring zero external CDN scripts or JS logic—lightweight, responsive, and easy to customize!

This project is ideal for beginner-to-intermediate web design students wanting to practice modern CSS layouts, text gradients, keyframe animations, and festive greeting web pages!

Don't forget to Like, Share, and Subscribe to Computer Soft Skills for more creative coding tutorials!


 <!-- WELCOME ALL OF YOU ON COMPUTER SOFT SKILLS YT CHANNEL ------>

<!-- Complete, single-file HTML & CSS code to wish Happy Maha Shivratri  ------>


<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Happy Maha Shivratri</title>

    

    <style>

        * {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

        }


        body {

            min-height: 100vh;

            display: flex;

            justify-content: center;

            align-items: center;

            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

            overflow: hidden;

            

            /* Indian Tricolor Background (Saffron -> White -> Green) */

            background: linear-gradient(135deg, 

                #FF9933 0%, 

                #FFB366 25%, 

                #FFFFFF 50%, 

                #85E085 75%, 

                #138808 100%

            );

            background-size: 200% 200%;

            animation: gradientShift 8s ease infinite alternate;

        }


        /* Animated movement for the tricolor background */

        @keyframes gradientShift {

            0% { background-position: 0% 0%; }

            100% { background-position: 100% 100%; }

        }


        /* ======= MAIN CARD ======= */

        .card {

            position: relative;

            background: rgba(13, 17, 23, 0.85); /* Dark transparent backdrop */

            border: 2px solid rgba(255, 215, 0, 0.5);

            border-radius: 20px;

            padding: 50px 40px;

            text-align: center;

            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6),

                        0 0 30px rgba(255, 153, 51, 0.3);

            max-width: 550px;

            width: 90%;

            z-index: 1;

        }


        /* Decorative Gold Border Accent */

        .card::before {

            content: '';

            position: absolute;

            top: 10px;

            left: 10px;

            right: 10px;

            bottom: 10px;

            border: 1px dashed rgba(255, 215, 0, 0.4);

            border-radius: 15px;

            pointer-events: none;

        }


        /* ======= OM LOGO ======= */

        .om-container {

            position: relative;

            margin: 0 auto 20px auto;

            width: 120px;

            height: 120px;

            display: flex;

            justify-content: center;

            align-items: center;

        }


        .om-symbol {

            font-family: Georgia, 'Times New Roman', serif;

            font-size: 95px;

            font-weight: bold;

            color: #FF9933;

            text-shadow: 

                0 0 10px #FF9933,

                0 0 20px #FF9933,

                0 0 40px #FF6600;

            animation: pulseGlow 2.5s infinite alternate ease-in-out;

        }


        @keyframes pulseGlow {

            0% {

                transform: scale(1);

                filter: drop-shadow(0 0 10px rgba(255, 153, 51, 0.6));

            }

            100% {

                transform: scale(1.08);

                filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.9));

            }

        }


        /* ======= TYPOGRAPHY ======= */

        .subtitle {

            font-size: 1.1rem;

            letter-spacing: 5px;

            color: #ffd700;

            text-transform: uppercase;

            margin-bottom: 10px;

            font-weight: 800;

        }


        .title {

            font-family: Impact, 'Arial Black', sans-serif;

            font-size: 2.8rem;

            line-height: 1.2;

            letter-spacing: 2px;

            margin-bottom: 15px;

            

            /* Gold Gradient Text */

            background: linear-gradient(180deg, #FFFFFF 0%, #FFD700 100%);

            -webkit-background-clip: text;

            -webkit-text-fill-color: transparent;

            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8));

        }


        .divider {

            width: 100px;

            height: 2px;

            background: linear-gradient(90deg, transparent, #FFD700, transparent);

            margin: 20px auto;

        }


        .wishes {

            color: #e0e0e0;

            font-size: 1.05rem;

            line-height: 1.8;

            font-weight: 400;

        }


        .mantra {

            margin-top: 25px;

            font-family: 'Arial Unicode MS', 'Segoe UI', sans-serif;

            font-size: 1.4rem;

            font-weight: bold;

            color: #138808;

            background: rgba(255, 255, 255, 0.95);

            padding: 8px 25px;

            border-radius: 50px;

            display: inline-block;

            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);

        }

    </style>

</head>

<body>


    <div class="card">

        <!-- Om Logo with Glowing Effect -->

        <div class="om-container">

            <div class="om-symbol">реР</div>

        </div>


        <!-- Greeting Content -->

        <div class="subtitle">HAR HAR MAHADEV</div>

        <div class="title">HAPPY MAHA SHIVRATRI</div>

        

        <div class="divider"></div>


        <p class="wishes">

            May Lord Shiva shower his divine blessings upon you and your family. 

            May this auspicious night bring peace, health, and eternal prosperity into your life.

        </p>


        <!-- Sacred Mantra Badge -->

        <div class="mantra">

            || реР рдирдоः рд╢िрд╡ाрдп ||

        </div>

    </div>


</body>

</html>

Happy Raksha Bandhan Greeting Card Animation using HTML& CSS

 Happy Raksha Bandhan Greeting Card Animation using HTML& CSS 



In this step-by-step tutorial, learn how to build a stunning, interactive Happy Raksha Bandhan Greeting Card using 100% Pure HTML5 and CSS3—completely without JavaScript or external libraries!

ЁЯМЯ Key Features Covered:

  • Pure CSS Animated Rakhi: Built with floating CSS animations (@keyframes floatRakhi), a spinning petal ring, and multi-layered radial gradients for the center gem.

  • Glowing Silk Thread (Dhaaga): Rendered using multi-color linear gradients and box-shadow glowing effects.

  • Modern Glassmorphism UI: Features a dark glass card with backdrop-filter: blur(), glowing gold borders, and elegant ambient background radial glows.

  • Gradient Typography: Beautiful gold text styling created with -webkit-background-clip: text and custom fallbacks.

  • Zero External Dependencies: Built entirely with Vanilla HTML and CSS—runs fast, offline, and is fully responsive on mobile and desktop screens.

This project is perfect for web developers and coding enthusiasts wanting to practice modern CSS styling, keyframe animations, glassmorphism UI design, and festive greeting web pages!

Don't forget to Like, Share, and Subscribe to Computer Soft Skills for more creative coding content!


<!-- WELCOME ALL OF YOU ON COMPUTER SOFT SKILLS YT CHANNEL ------>

<!-- Complete, single-file HTML & CSS web page for Raksha Bandhan. ------>


<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Happy Raksha Bandhan</title>

    

    <style>

        * {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

        }


        body {

            min-height: 100vh;

            display: flex;

            justify-content: center;

            align-items: center;

            background-color: #0c0814;

            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

            overflow-x: hidden;

            padding: 20px;

        }


        /* ======= AMBIENT TRICOLOR BACKGROUND GLOW ======= */

        .glow-bg {

            position: fixed;

            top: 50%;

            left: 50%;

            transform: translate(-50%, -50%);

            width: 600px;

            height: 600px;

            background: radial-gradient(circle, rgba(255, 153, 51, 0.25) 0%, rgba(212, 175, 55, 0.15) 40%, rgba(19, 136, 8, 0.1) 70%, transparent 100%);

            filter: blur(50px);

            z-index: 0;

            pointer-events: none;

            animation: pulseGlow 6s ease-in-out infinite alternate;

        }


        @keyframes pulseGlow {

            0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.8; }

            100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }

        }


        /* ======= MAIN GLASS CARD ======= */

        .card {

            position: relative;

            z-index: 1;

            background: rgba(22, 16, 34, 0.75);

            border: 2px solid rgba(212, 175, 55, 0.4);

            border-radius: 24px;

            padding: 50px 30px;

            max-width: 650px;

            width: 100%;

            text-align: center;

            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6),

                        0 0 30px rgba(212, 175, 55, 0.2);

            backdrop-filter: blur(15px);

        }


        /* Decorative Gold Corner Borders */

        .card::before {

            content: '';

            position: absolute;

            top: 12px;

            left: 12px;

            right: 12px;

            bottom: 12px;

            border: 1px dashed rgba(212, 175, 55, 0.35);

            border-radius: 18px;

            pointer-events: none;

        }


        /* ======= RAKHI CONTAINER ======= */

        .rakhi-wrapper {

            position: relative;

            width: 100%;

            height: 180px;

            display: flex;

            justify-content: center;

            align-items: center;

            margin-bottom: 25px;

        }


        /* SILK THREAD (DHAAGA) */

        .thread {

            position: absolute;

            width: 100%;

            height: 8px;

            background: linear-gradient(90deg, 

                #ff4500 0%, 

                #ffd700 25%, 

                #ff1493 50%, 

                #ffd700 75%, 

                #ff4500 100%

            );

            border-radius: 4px;

            box-shadow: 0 0 10px rgba(255, 69, 0, 0.8),

                        0 0 15px rgba(255, 215, 0, 0.6);

        }


        /* RAKHI CENTER DIAL */

        .rakhi-dial {

            position: relative;

            width: 140px;

            height: 140px;

            background: radial-gradient(circle, #e6005c 0%, #80002a 100%);

            border-radius: 50%;

            display: flex;

            justify-content: center;

            align-items: center;

            border: 3px solid #ffd700;

            box-shadow: 0 0 25px rgba(255, 215, 0, 0.8),

                        inset 0 0 15px rgba(0, 0, 0, 0.5);

            z-index: 2;

            animation: floatRakhi 4s ease-in-out infinite alternate;

        }


        @keyframes floatRakhi {

            0% { transform: translateY(-5px) rotate(0deg); }

            100% { transform: translateY(5px) rotate(3deg); }

        }


        /* PETALS AROUND RAKHI */

        .petal-ring {

            position: absolute;

            width: 100%;

            height: 100%;

            border-radius: 50%;

            border: 2px dashed #ffd700;

            animation: spinRing 20s linear infinite;

        }


        @keyframes spinRing {

            100% { transform: rotate(360deg); }

        }


        /* INNER FLORAL DESIGN */

        .rakhi-inner {

            width: 90px;

            height: 90px;

            background: radial-gradient(circle, #ffd700 0%, #ff9933 100%);

            border-radius: 50%;

            display: flex;

            justify-content: center;

            align-items: center;

            border: 2px solid #ffffff;

            box-shadow: 0 0 10px rgba(255, 215, 0, 0.9);

        }


        .center-gem {

            width: 35px;

            height: 35px;

            background: radial-gradient(circle, #ffffff 0%, #ff0055 70%, #990033 100%);

            border-radius: 50%;

            border: 2px solid #ffd700;

            box-shadow: 0 0 12px #ff0055;

        }


        /* ======= TYPOGRAPHY ======= */

        .subtitle {

            font-size: 1rem;

            letter-spacing: 5px;

            color: #ffd700;

            text-transform: uppercase;

            font-weight: 700;

            margin-bottom: 8px;

        }


        .title {

            font-family: Georgia, 'Times New Roman', serif;

            font-size: 2.8rem;

            font-weight: bold;

            line-height: 1.2;

            margin-bottom: 20px;


            /* Gold Gradient Text */

            background: linear-gradient(180deg, #FFFFFF 0%, #FFD700 60%, #FF9933 100%);

            -webkit-background-clip: text;

            -webkit-text-fill-color: transparent;

            filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));

        }


        .divider {

            width: 120px;

            height: 2px;

            background: linear-gradient(90deg, transparent, #FFD700, transparent);

            margin: 0 auto 25px auto;

        }


        .message {

            color: #e2e0e7;

            font-size: 1.1rem;

            line-height: 1.8;

            font-weight: 300;

            margin-bottom: 30px;

        }


        .highlight {

            color: #ffd700;

            font-weight: bold;

        }


        /* ======= DECORATIVE BADGES ======= */

        .badge-container {

            display: flex;

            justify-content: center;

            gap: 15px;

            flex-wrap: wrap;

        }


        .badge {

            background: rgba(255, 215, 0, 0.1);

            border: 1px solid rgba(255, 215, 0, 0.4);

            color: #ffd700;

            padding: 8px 20px;

            border-radius: 50px;

            font-size: 0.9rem;

            letter-spacing: 1px;

            backdrop-filter: blur(5px);

            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

        }

    </style>

</head>

<body>


    <!-- Background Ambient Glow -->

    <div class="glow-bg"></div>


    <!-- Main Card -->

    <div class="card">

        

        <!-- Animated Rakhi Display -->

        <div class="rakhi-wrapper">

            <!-- Silk Thread -->

            <div class="thread"></div>


            <!-- Rakhi Centerpiece -->

            <div class="rakhi-dial">

                <div class="petal-ring"></div>

                <div class="rakhi-inner">

                    <div class="center-gem"></div>

                </div>

            </div>

        </div>


        <!-- Greeting Text -->

        <div class="subtitle">CELEBRATING BOND OF LOVE</div>

        <div class="title">HAPPY RAKSHA BANDHAN</div>

        

        <div class="divider"></div>


        <p class="message">

            On this joyous occasion, celebrating the sacred thread that binds brothers and sisters in 

            <span class="highlight">unconditional love, protection, and lifelong memories</span>. 

            May this day bring endless happiness, laughter, and prosperity into your lives!

        </p>


        <!-- Festive Badges -->

        <div class="badge-container">

            <div class="badge">ЁЯМ╕ Love & Protection</div>

            <div class="badge">✨ Sacred Thread</div>

            <div class="badge">ЁЯОЙ Joyful Celebration</div>

        </div>


    </div>


</body>

</html>

Infinite Cosmic Zoom Animation Moon and Star using HTML & CSS Star & Moon Tunnel

Infinite Cosmic Zoom Animation Moon and Star using HTML & CSS Star & Moon Tunnel



In this step-by-step tutorial, learn how to build a hypnotic Infinite Star & Moon Zoom Tunnel Animation using 100% Pure HTML and CSS—with zero JavaScript!

ЁЯМЯ Project Highlights:

  • Seamless Infinite Zoom Loop: Staggers multiple CSS layer animations with calculated negative delays (0s, -3s, -6s) to form a smooth, endless cosmic tunnel.

  • 3D Perspective Scaling: Uses CSS @keyframes with transform: scale() and 3D rotation to create deep space optical illusions.

  • Pure CSS Crescent Moons: Renders detailed glowing crescent moons using CSS box-shadow and filter: drop-shadow().

  • Glowing Cosmic Effects: Features multi-layered text shadows and dashed orbit rings in neon cyan, gold, and purple hues.

  • Zero JavaScript Dependencies: Lightweight, self-contained single-file code that requires no JS libraries or external downloads.

This project is ideal for beginner-to-intermediate web developers looking to master CSS Keyframes, CSS Variables, 3D Transforms, and Box Shadow techniques!

If you enjoyed this tutorial, make sure to Like, Share, and Subscribe to Computer Soft Skills for more creative coding content!


 <!-- WELCOME ALL OF YOU ON COMPUTER SOFT SKILLS YT CHANNEL ------>

<!-- Continuous, seamless infinite zoom effect combining glowing stars and moons into deep space ------>


<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Infinite Star & Moon Zoom</title>

    

    <style>

        * {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

        }


        body {

            background-color: #030308;

            height: 100vh;

            width: 100vw;

            overflow: hidden;

            display: flex;

            justify-content: center;

            align-items: center;

        }


        /* ======= FULLSCREEN ZOOM CONTAINER ======= */

        .zoom-container {

            position: relative;

            width: 100vw;

            height: 100vh;

            display: flex;

            justify-content: center;

            align-items: center;

            perspective: 1000px;

        }


        /* ======= ZOOM LAYER BASE ======= */

        .zoom-layer {

            position: absolute;

            width: 400px;

            height: 400px;

            display: flex;

            justify-content: center;

            align-items: center;

            

            /* Infinite Scaling Animation */

            animation: infiniteZoom 9s linear infinite;

        }


        /* Offset timings for endless continuous zoom */

        .layer-1 { animation-delay: 0s; }

        .layer-2 { animation-delay: -3s; }

        .layer-3 { animation-delay: -6s; }


        /* ======= MOON & STAR ELEMENTS ======= */

        

        /* Central Crescent Moon */

        .moon {

            position: absolute;

            width: 120px;

            height: 120px;

            border-radius: 50%;

            box-shadow: -22px 12px 0 0 #ffd700;

            filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.8));

            transform: rotate(-15deg);

        }


        /* Orbiting Glowing Stars around Moon */

        .star {

            position: absolute;

            color: #ffffff;

            font-size: 2rem;

            text-shadow: 0 0 10px #ffffff, 0 0 25px #00e5ff, 0 0 45px #ba55d3;

            user-select: none;

        }


        /* Star Positions on Ring */

        .star-1 { top: 10%; left: 15%; font-size: 2.5rem; }

        .star-2 { top: 20%; right: 10%; font-size: 1.8rem; }

        .star-3 { bottom: 15%; left: 20%; font-size: 2.2rem; }

        .star-4 { bottom: 10%; right: 15%; font-size: 2.8rem; }

        .star-5 { top: -10%; left: 50%; font-size: 1.5rem; }


        /* Outer Orbit Ring */

        .ring {

            position: absolute;

            width: 100%;

            height: 100%;

            border-radius: 50%;

            border: 1px dashed rgba(255, 255, 255, 0.25);

            box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.2), 0 0 30px rgba(186, 85, 211, 0.2);

        }


        /* ======= INFINITE ZOOM ANIMATION ======= */

        @keyframes infiniteZoom {

            0% {

                transform: scale(0.01) rotate(0deg);

                opacity: 0;

            }

            15% {

                opacity: 1;

            }

            85% {

                opacity: 1;

            }

            100% {

                transform: scale(10) rotate(90deg);

                opacity: 0;

            }

        }

    </style>

</head>

<body>


    <div class="zoom-container">

        <!-- Layer 1 -->

        <div class="zoom-layer layer-1">

            <div class="ring"></div>

            <div class="moon"></div>

            <div class="star star-1">✦</div>

            <div class="star star-2">★</div>

            <div class="star star-3">✧</div>

            <div class="star star-4">✦</div>

            <div class="star star-5">★</div>

        </div>


        <!-- Layer 2 -->

        <div class="zoom-layer layer-2">

            <div class="ring" style="border-color: rgba(255, 215, 0, 0.3);"></div>

            <div class="moon" style="box-shadow: -22px 12px 0 0 #ffffff; filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.9));"></div>

            <div class="star star-1" style="color: #ffd700;">★</div>

            <div class="star star-2" style="color: #ffffff;">✦</div>

            <div class="star star-3" style="color: #ffd700;">✦</div>

            <div class="star star-4" style="color: #ffffff;">✧</div>

            <div class="star star-5" style="color: #ffd700;">★</div>

        </div>


        <!-- Layer 3 -->

        <div class="zoom-layer layer-3">

            <div class="ring" style="border-color: rgba(0, 229, 255, 0.3);"></div>

            <div class="moon" style="box-shadow: -22px 12px 0 0 #00e5ff; filter: drop-shadow(0 0 25px rgba(0, 229, 255, 0.9));"></div>

            <div class="star star-1" style="color: #ba55d3;">✧</div>

            <div class="star star-2" style="color: #00e5ff;">★</div>

            <div class="star star-3" style="color: #ba55d3;">★</div>

            <div class="star star-4" style="color: #00e5ff;">✦</div>

            <div class="star star-5" style="color: #ba55d3;">✧</div>

        </div>

    </div>


</body>

</html>

Interactive Waving Indian Flag Animation with Pole & Stair Base in HTML, CSS & JS

Interactive Waving Indian Flag Animation with Pole & Stair Base in HTML, CSS & JS

This single-file web project creates an interactive, realistic animated Indian Flag complete with a metallic flagpole, a decorative gold finial knob, and a structured three-tier pedestal base. Designed with a dark, modern background, the centerpiece features a 300x200 pixel flag hoisted at the top of a detailed 420px metallic pole.

The flag's waving motion is powered by Vanilla JavaScript and CSS keyframe animations. Upon page load, JavaScript dynamically splits the flag container into individual 1-pixel vertical slices. Each slice maps a shifted segment of the flag image (flag.jpg) and receives an incremental CSS animation delay. As these slices oscillate vertically in sequence, they produce a smooth, continuous ripple effect across the fabric that mimics wind blowing in real time. Built cleanly using HTML5, modern CSS flexbox layouts, and lightweight DOM manipulation, this self-contained script requires no external libraries or CDN dependencies to run smoothly i n andy browsaer.

First Download this image and save in your PC where  you save HTML file :-




 <!-- WELCOME ALL OF YOU ON COMPUTER SOFT SKILLS YT CHANNEL ------>

<!-- single-file HTML, CSS and JavaScript web page that creates an Indian Flag with wave. ------>


<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="utf-8">

    <title>Waving Indian Flag with Pole and Stairs Base</title>

    

    <style>

        body {

            margin: 0;

            padding: 0;

            background-color: #0d1117;

            display: flex;

            justify-content: center;

            align-items: center;

            min-height: 100vh;

        }


        /* ======= MAIN WRAPPER ======= */

        .flag-wrapper {

            position: relative;

            display: flex;

            flex-direction: column;

            align-items: center;

        }


        .pole-and-flag {

            display: flex;

            align-items: flex-start; /* Flag connects to top of pole */

        }


        /* ======= FLAGPOLE / LOG ======= */

        .flag-pole {

            position: relative;

            width: 12px;

            height: 420px;

            background: linear-gradient(90deg, #3a3a3a 0%, #a8a8a8 50%, #222222 100%);

            border-radius: 6px 6px 0 0;

            box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);

            z-index: 2;

        }


        /* Gold knob at top of the pole */

        .flag-pole::before {

            content: '';

            position: absolute;

            top: -15px;

            left: 50%;

            transform: translateX(-50%);

            width: 22px;

            height: 22px;

            background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);

            border-radius: 50%;

            box-shadow: 0 0 5px rgba(255, 215, 0, 0.6);

        }


        /* ======= 3-TIER STAIR BASE ======= */

        .stairs-base {

            display: flex;

            flex-direction: column;

            align-items: center;

            margin-left: -300px; /* Aligns pole precisely to the center of stairs */

        }


        .stair {

            height: 16px;

            border-radius: 2px;

            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);

            border: 1px solid #777;

        }


        /* Top Step (Smallest) */

        .stair-1 {

            width: 80px;

            background: linear-gradient(180deg, #e0e0e0 0%, #9e9e9e 100%);

        }


        /* Middle Step */

        .stair-2 {

            width: 140px;

            background: linear-gradient(180deg, #d6d6d6 0%, #8d8d8d 100%);

        }


        /* Bottom Step (Widest) */

        .stair-3 {

            width: 200px;

            background: linear-gradient(180deg, #cccccc 0%, #7c7c7c 100%);

        }


        /* ======= FLAG CONTAINER ======= */

        .flag {

            position: relative;

            width: 300px;

            height: 200px;

            margin-top: 5px; /* Alignment near top of pole */

            box-shadow: 5px 10px 20px rgba(0, 0, 0, 0.4);

            white-space: nowrap;

        }


        .flag-element {

            position: relative;

            background: url('flag.jpg');

            background-size: 300px 100%;

            width: 1px;

            height: 100%;

            display: inline-block;

            animation: wave 1.2s ease-in-out infinite alternate;

        }


        /* ======= WAVING ANIMATION ======= */

        @keyframes wave {

            0% {

                top: 4px;

            }

            100% {

                top: -8px;

            }

        }

    </style>

</head>

<body>


    <div class="flag-wrapper">

        <div class="pole-and-flag">

            <!-- Pole / Log on the left -->

            <div class="flag-pole"></div>

            

            <!-- Waving Flag connected to top of pole -->

            <div class="flag"></div>

        </div>


        <!-- 3 Stairs Base connected to pole bottom -->

        <div class="stairs-base">

            <div class="stair stair-1"></div>

            <div class="stair stair-2"></div>

            <div class="stair stair-3"></div>

        </div>

    </div>


    <!-- Pure Vanilla JavaScript (No External CDN Links) -->

    <script>

        document.addEventListener('DOMContentLoaded', function() {

            var flagContainer = document.querySelector('.flag');

            var flagWidth = flagContainer.offsetWidth;


            for (var i = 0; i < flagWidth; i++) {

                var flagElement = document.createElement('div');

                flagElement.className = 'flag-element';

                flagElement.style.backgroundPosition = -i + 'px 0';

                

                // Gradually increase animation delay across width for wave effect

                flagElement.style.animationDelay = (i * 8) + 'ms';

                flagContainer.appendChild(flagElement);

            }

        });

    </script>


</body>

</html>





Full Screen Waving Indian Flag Animation - HTML, CSS & JavaScript

 Full Screen Waving Indian Flag Animation - HTML, CSS & JavaScript



<!-- Happy Independence Day -->
<!-- WELCOME ALL OF YOU ON COMPUTER SOFT SKILLS YT CHANNEL ------>
<!-- single-file HTML, CSS and JavaScript Full Screen page Waving Indian Flag ------>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Full Screen Pure CSS Waving Indian Flag</title>
    
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background-color: #0d1117;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            overflow: hidden;
            /* Exactly 50px space on all sides */
            padding: 50px;
        }

        /* ======= FULLSCREEN FLAG CONTAINER ======= */
        .flag {
            position: relative;
            /* Full viewport width and height minus 50px space on both sides (100px total) */
            width: calc(100vw - 100px);
            height: calc(100vh - 100px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
            white-space: nowrap;
            overflow: hidden;
        }

        .flag-element {
            position: relative;
            /* Dynamic percentage width to smoothly stretch slices across full screen */
            width: 0.333%;
            height: 100%;
            display: inline-block;
            animation: wave 1.2s ease-in-out infinite alternate;
            
            /* Pure CSS Tricolor Stripes */
            background: linear-gradient(180deg, 
                #FF9933 0%, #FF9933 33.33%, 
                #FFFFFF 33.33%, #FFFFFF 66.66%, 
                #138808 66.66%, #138808 100%
            );
        }

        /* ======= RESPONSIVE ASHOKA CHAKRA OVERLAY ======= */
        .chakra {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            /* Dynamically scales proportionally to screen size */
            width: 25vh;
            height: 25vh;
            max-width: 25vw;
            max-height: 25vw;
            z-index: 10;
            pointer-events: none;
        }

        /* ======= WAVING ANIMATION ======= */
        @keyframes wave {
            0% {
                transform: translateY(12px);
            }
            100% {
                transform: translateY(-12px);
            }
        }
    </style>
</head>
<body>

    <!-- Fullscreen Waving Flag -->
    <div class="flag">
        <!-- SVG Ashoka Chakra (24 Spokes) -->
        <svg class="chakra" viewBox="0 0 100 100">
            <circle cx="50" cy="50" r="45" stroke="#000080" stroke-width="4" fill="none"/>
            <circle cx="50" cy="50" r="6" fill="#000080"/>
            <!-- 24 Spokes -->
            <g stroke="#000080" stroke-width="2">
                <line x1="50" y1="50" x2="50" y2="5"/><line x1="50" y1="50" x2="50" y2="95"/>
                <line x1="50" y1="50" x2="5" y2="50"/><line x1="50" y1="50" x2="95" y2="50"/>
                <line x1="50" y1="50" x2="18.18" y2="18.18"/><line x1="50" y1="50" x2="81.82" y2="81.82"/>
                <line x1="50" y1="50" x2="81.82" y2="18.18"/><line x1="50" y1="50" x2="18.18" y2="81.82"/>
                <line x1="50" y1="50" x2="10.87" y2="32.64"/><line x1="50" y1="50" x2="89.13" y2="67.36"/>
                <line x1="50" y1="50" x2="32.64" y2="10.87"/><line x1="50" y1="50" x2="67.36" y2="89.13"/>
                <line x1="50" y1="50" x2="67.36" y2="10.87"/><line x1="50" y1="50" x2="32.64" y2="89.13"/>
                <line x1="50" y1="50" x2="89.13" y2="32.64"/><line x1="50" y1="50" x2="10.87" y2="67.36"/>
                <line x1="50" y1="50" x2="6.7" y2="41.32"/><line x1="50" y1="50" x2="93.3" y2="58.68"/>
                <line x1="50" y1="50" x2="41.32" y2="6.7"/><line x1="50" y1="50" x2="58.68" y2="93.3"/>
                <line x1="50" y1="50" x2="58.68" y2="6.7"/><line x1="50" y1="50" x2="41.32" y2="93.3"/>
                <line x1="50" y1="50" x2="93.3" y2="41.32"/><line x1="50" y1="50" x2="6.7" y2="58.68"/>
            </g>
        </svg>
    </div>

    <!-- Self-Contained Vanilla JavaScript Data -->
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            var flag = document.getElementsByClassName('flag')[0];
            var totalSlices = 300; // Generates 300 vertical slices for a smooth wave across large displays

            for (var i = 0; i < totalSlices; i++) {
                var flagElement = document.createElement('div');
                flagElement.className = 'flag-element';

                // Wave animation delay per slice
                flagElement.style.animationDelay = (i * 6) + 'ms';
                flag.appendChild(flagElement);
            }
        });
    </script>

</body>
</html>

Featured Post

Happy Maha Shivratri Greeting Card Animated Pure HTML & CSS Page

Happy Maha Shivratri Greeting Card Animated Pure HTML & CSS Page In this step-by-step tutorial, learn how to build an animated Happy Mah...

Popular Posts