Loading image

Live Code Editor

Try it yourself..

Glitch Effect Loader

This code creates a glitchy text animation effect for the word "Loading..." on a dark radial gradient background. Here's a summary:

HTML Structure:

  • Basic HTML5 document with a <div> displaying "Loading..." text
  • Includes jQuery and Lettering.js libraries from CDN
  • Links to external CSS (glitch.css) and JS (glitch.js) files
  • Has an overlay <div> for visual effects

CSS Styling:

  • Uses a monospace font (Source Code Pro)
  • Creates a dark radial gradient background
  • Positions the text absolutely centered on screen
  • Adds greenish text shadow for a "digital" look
  • Defines animation states for letters (transform and color changes)
  • Includes a semi-transparent overlay gradient

JavaScript Animation:

  • The Ticker class handles the glitch animation:
    • Splits text into individual letters using Lettering.js
    • Replaces each letter with random characters from a predefined set
    • Cycles through 5 random characters before revealing the original letter
    • Progresses through each letter sequentiallyWhen complete, resets and repeats the animation
  • Uses requestAnimationFrame for smooth animation
  • Each letter gets a random opacity during the glitch phase
  • Original letters are revealed in green color

Overall Effect:

Creates a loading screen with the word "Loading..." that appears to glitch (rapidly display random characters) before settling into its correct form, then repeats this effect continuously. The design has a retro-computer/cyberpunk aesthetic with the dark background and green text effects.

HTML

CSS

JavaScript

Output