Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • JS Tutorial
  • JS Exercise
  • JS Interview Questions
  • JS Array
  • JS String
  • JS Object
  • JS Operator
  • JS Date
  • JS Error
  • JS Projects
  • JS Set
  • JS Map
  • JS RegExp
  • JS Math
  • JS Number
  • JS Boolean
  • JS Examples
  • JS Free JS Course
  • JS A to Z Guide
  • JS Formatter
Open In App
Next Article:
Create a Weather App in HTML Bootstrap & JavaScript
Next article icon

Create a Splash Page App in HTML CSS & JavaScript

Last Updated : 26 Jul, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

The Splash Screen is the UI element that appears as the initial screen or the loading screen. Splash Page Application consists of a styled animative splash screen effect which automatically makes the curtain opening splash effect into the application for a specific time and renders the dynamic content once the effect is been completed. We will develop this Splash Page Animative effect using HTML, CSS, and JavaScript.

Preview Image:

Screenshot-(1329)-min-min

Prerequisites:

  • HTML
  • CSS
  • JavaScript

Approach:

  • Create the basic layout or structure of the application using various HTML tags like <h1>,<h3>,<div>, etc. Also, link all the essential external libraries with the CDN links.
  • Create the overall structure for the splash screen inside the #splash div. Add all the other animative components like Loading Spinner, title, etc.
  • Add CSS styling to style the splash screen, dynamic content, and other elements. Also, implement the keyframe animations for various effects like bouncing, etc.
  • In the JavaScript file, use the DOMContentLoaded event to initiate the Splash Screen logic. Set the loading time and hide the splash screen while displaying the dynamic content.

Project Structure:

Example: This example describes the basic implementation for a Splash Page App in HTML CSS and JavaScript

HTML
<!DOCTYPE html>  <head>     <title>GeeksforGeeks</title>     <link rel="stylesheet"            href= "https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">     <link rel="stylesheet"            href= "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">     <link href= "https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap"           rel="stylesheet">     <link rel="stylesheet"           href="styles.css"> </head>  <body>     <div id="preloader">         <div id="loader"></div>     </div>     <div id="splash" class="animated-splash">         <div class="curtain">             <div class="splash-content">                 <i class="fas fa-spin fa-spinner"></i>                 <h1 class="animated-title">GeeksforGeeks</h1>                 <h3 class="animated-subtitle">Learn, Code, Contribute!</h3>                 <div class="animated-emoji" id="loadingEmoji">                     &#x1F60D;                 </div>             </div>             <div class="additional-splash-effects"></div>         </div>     </div>     <div id="content" style="display: none;">         <div class="card">             <h1>                 <i class="fas fa-code">                 </i> GeeksforGeeks             </h1>             <p>Learn, Code, Contribute!</p>             <div class="animated-emoji" id="geeksEmoji">                 &#x1F913;             </div>         </div>     </div>     <script src= "https://cdn.jsdelivr.net/npm/[email protected]/dist/splash-screen.min.js">     </script>     <script src="app.js">     </script> </body>  </html> 
CSS
body {     font-family: 'Montserrat', sans-serif;     margin: 0;     padding: 0;     height: 100vh;     overflow: hidden;     background: linear-gradient(135deg, #3498db, #8e44ad); }  #preloader {     position: fixed;     width: 100%;     height: 100%;     background: #fda56b;     display: flex;     align-items: center;     justify-content: center;     z-index: 9999; }  #loader {     border: 8px solid #f3f3f3;     border-top: 8px solid #3498db;     border-radius: 50%;     width: 50px;     height: 50px;     animation: spin 1s linear infinite; }  @keyframes spin {     0% {         transform: rotate(0deg);     }      100% {         transform: rotate(360deg);     } }  #splash {     height: 100vh;     display: flex;     align-items: flex-end; }  .curtain {     width: 100%;     height: 100%;     position: absolute;     bottom: 0;     overflow: hidden;     animation: curtainAnimation 4s ease-out forwards, gradientAnimation 3s ease-out forwards; }  .splash-content {     text-align: center;     padding: 20px;     color: #fff;     position: relative;     z-index: 2; }  .splash-content i {     font-size: 2em; }  .additional-splash-effects {     position: absolute;     bottom: 0;     width: 100%;     height: 100%;     background: linear-gradient(135deg, #ff6b6b, #8e44ad, #3498db, #e74c3c);     animation: backgroundAnimation 20s infinite alternate;     z-index: 1; }  #content {     text-align: center;     position: relative; }  .card {     background-color: #dbca34;     padding: 20px;     border-radius: 10px;     box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);     margin: 20px;     color: rgb(255, 0, 0);     width: 300px;     animation: cardAnimation 1.5s ease-out; }  .card i {     margin-right: 5px; }  .animated-emoji {     font-size: 2em;     margin-top: 10px;     animation: bounce 1s infinite; }  .animated-title {     animation: fadeInDown 1.5s ease-out; }  .animated-subtitle {     animation: fadeInUp 1.5s ease-out; }  @keyframes curtainAnimation {     0% {         transform: translateY(100%);     }      100% {         transform: translateY(0);     } }  @keyframes gradientAnimation {     0% {         opacity: 0;     }      100% {         opacity: 1;     } }  @keyframes backgroundAnimation {     0% {         background-position: 0% 50%;     }      100% {         background-position: 100% 50%;     } }  @keyframes cardAnimation {     0% {         opacity: 0;         transform: translateY(20px);     }      100% {         opacity: 1;         transform: translateY(0);     } }  @keyframes bounce {      0%,     20%,     50%,     80%,     100% {         transform: translateY(0);     }      40% {         transform: translateY(-20px);     }      60% {         transform: translateY(-10px);     } }  @keyframes fadeInDown {     0% {         opacity: 0;         transform: translateY(-20px);     }      100% {         opacity: 1;         transform: translateY(0);     } }  @keyframes fadeInUp {     0% {         opacity: 0;         transform: translateY(20px);     }      100% {         opacity: 1;         transform: translateY(0);     } } 
JavaScript
document.addEventListener("DOMContentLoaded",  function () {     setTimeout(function () {         document.getElementById("preloader")         .style.display = "none";         setTimeout(function ()          {             document.getElementById("splash")             .style.display = "none";             document.getElementById("content")             .style.display = "block";             addLiveAnimations();         }, 3000);     }, 1000); }); 

Output:



Next Article
Create a Weather App in HTML Bootstrap & JavaScript

G

gpancomputer
Improve
Article Tags :
  • Project
  • JavaScript
  • Web Technologies
  • Dev Scripter
  • JavaScript-Projects
  • Dev Scripter 2024

Similar Reads

  • Create a Single Page Application using HTML CSS & JavaScript
    In this article, we are going to design and build a cool and user-friendly single-page application (SPA) using just HTML, CSS, and JavaScript. A single-page application contains multiple pages which can be navigated or visited without loading the page every time. This makes things faster and more in
    4 min read
  • Create an Infinite Scroll Page using HTML CSS & JavaScript
    In this article, we will create an infinite scroll page using HTML, CSS, and JavaScript. Infinite scrolling allows you to load and display content as the user scrolls down the page, providing a seamless browsing experience. We'll fetch and append new content dynamically as the user reaches the end o
    2 min read
  • Create a Math Sprint Game in HTML CSS & JavaScript
    The math sprint game presents random math questions with four options. Players click the correct answer, and if correct, it's acknowledged; otherwise, an incorrect answer message is shown. A 20-second timer adds urgency, ending the game. The score (High Score) is displayed, along with buttons to sta
    5 min read
  • Build A Weather App in HTML CSS & JavaScript
    A weather app contains a user input field for the user, which takes the input of the city name. Once the user enters the city name and clicks on the button, then the API Request is been sent to the OpenWeatherMap and the response is been retrieved in the application which consists of weather, wind s
    7 min read
  • Create a Weather App in HTML Bootstrap & JavaScript
    A weather app contains a user input field for the user, which takes the input of the city name. Once the user enters the city name and clicks on the button, then the API Request is been sent to the OpenWeatherMap and the response is been retrieved in the application which consists of weather, wind s
    3 min read
  • How to create a Landing page using HTML CSS and JavaScript ?
    A landing page, also referred to as a lead capture page, static page, or destination page, serves a specific purpose and typically appears as a result of online advertising or search engine optimization efforts. Unlike a homepage, a landing page is stripped of distractions and focuses on capturing v
    7 min read
  • Create a Build A Simple Alarm Clock in HTML CSS & JavaScript
    In this article, we will develop an interactive simple Alarm Clock application using HTML, CSS, and JavaScript languages. Develop an alarm application featuring date and time input fields for setting alarms. Implement comprehensive validation to prevent duplicate alarms and enforce a maximum limit o
    5 min read
  • Create a Music Website Template using HTML, CSS & JavaScript
    A Music Website Template is a pre-designed layout for creating a music-themed webpage. By utilizing HTML, CSS, and JavaScript, developers can craft a functional and visually appealing website with features like play/pause controls, sections for home, music, about, and contact. Approach: We will crea
    3 min read
  • Create a Quiz App with Timer using HTML CSS and JavaScript
    Creating a quiz app is an excellent way to learn the fundamentals of web development. In this tutorial, we will build a Quiz App that features a timer, allowing users to take a timed quiz with multiple-choice questions. The app will use HTML for the structure, CSS for styling, and JavaScript for fun
    8 min read
  • Create a Resize and Compress Images in HTML CSS & JavaScript
    While using the GeeksforGeeks Write Portal to write articles, we need to upload the images. As we need to resize the image as per GeeksforGeeks's requirement, we search for different tools and websites on the internet to resize and compress the image. But, as a web developer, we can create our own i
    7 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences