Code Monkey home page Code Monkey logo

countdown-timer's Introduction

Countdown Timer

Screenshot_1

This web project features a countdown timer to the year 2024, providing a visual representation of the time remaining until the specified date. The project utilizes HTML, CSS, and JavaScript to create a visually appealing and dynamic user interface. Additionally, it includes confetti effects for a festive touch when the countdown reaches zero.

HTML File (index.html):

  • The HTML file sets up the basic structure of the webpage using standard HTML5 markup.
  • It includes metadata in the head section, such as character set, viewport settings, and the title of the webpage.
  • External resources, like the CSS file and the confetti JavaScript library, are linked using <link> and <script> tags.
  • Within the body, there is a container division (<div class="container">) containing headings and countdown details.
  • Headings include the year (h1), a subtitle (h3), and a tagline (h4).
  • Countdown details are organized within a <div class="countdown"> container, where each detail (days, hours, minutes, seconds, and "LEFT") has its own division.

CSS File (style.css):

  • Google Fonts are imported to use the "PT Serif" font throughout the webpage.
  • CSS variables are declared in the :root selector to define colors used in the styling.
  • General styling rules include setting a background image and positioning the container in the center of the viewport.
  • The headings section is styled using the .headings class, with specific styles for h1, h3, and h4.
  • The countdown section is styled with flexbox, setting the width, gap, and height of individual countdown details.
  • Each detail is styled using the .detail class, with specific styles for the number and subheading.
  • The span.number class is used to style the countdown numbers with a glass-like effect, a shadow, and a border radius.
  • Additional styles are applied to enhance the overall visual appeal of the webpage.

JavaScript File (script.js):

  • The JavaScript file includes functions for various confetti effects (fireworks, school pride, realistic look, stars, and snow).
  • The countdown function calculates and displays the time remaining until the specified end date. When the countdown reaches zero, it triggers confetti effects and displays celebratory messages.
  • The script utilizes setInterval to update the countdown every second and initially calls the countdown function.

This project creates an engaging New Year countdown timer with confetti effects for a festive touch. The combination of HTML, CSS, and JavaScript results in an interactive and visually appealing user experience. Users can witness a celebration on the arrival of the new year, complete with dynamic countdown updates and animated confetti effects.

countdown-timer's People

Contributors

cosaslearning avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.