Skip to content

Meteor shower in WordPress

Shooting stars cross a starry night sky diagonally at irregular intervals, in pure CSS.

Here is an excerpt of this component's code in WordPress. The full code is free for members, ready to copy into your project.

This component also comes in

Open in a new tab

The code in WordPress

effet-pluie-meteores.php
<?php
/**
 * Plugin Name: Forge, Pluie d’étoiles filantes
 * Description: Des étoiles filantes traversent un ciel nocturne étoilé en diagonale, à intervalles irréguliers, en CSS pur. Ajoute la composition « Pluie d’étoiles filantes » à l'éditeur de blocs.
 * Version: 1.0.0
 * Requires at least: 6.6
 * Requires PHP: 8.1
 * Author: Forge
 * License: GPL-2.0-or-later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: forge-effet-pluie-meteores
 *
pattern.html
<!-- wp:group {"tagName": "section", "className": "efpm", "layout": {"type": "default"}} -->
<section class="wp-block-group efpm"><!-- wp:html -->
<div class="efpm-sky" aria-hidden="true">
          <span class="efpm-meteor" style="top: 8%; left: 72%; --efpm-delay: 0.0s; --efpm-d: 3.2s"></span>
          <span class="efpm-meteor" style="top: -5%; left: 45%; --efpm-delay: 1.1s; --efpm-d: 2.6s"></span>
          <span class="efpm-meteor" style="top: 12%; left: 92%; --efpm-delay: 2.3s; --efpm-d: 3.6s"></span>
          <span class="efpm-meteor" style="top: -10%; left: 60%; --efpm-delay: 3.4s; --efpm-d: 2.9s"></span>
          <span class="efpm-meteor" style="top: 20%; left: 82%; --efpm-delay: 4.6s; --efpm-d: 3.3s"></span>
          <span class="efpm-meteor" style="top: 2%; left: 30%; --efpm-delay: 5.5s; --efpm-d: 2.7s"></span>
        </div>
<!-- /wp:html -->
<!-- wp:group {"className": "efpm-content", "layout": {"type": "default"}} -->
style.css
:root {
  --demo-effet-pluie-meteores-bg: #e6e9f2;
  --demo-effet-pluie-meteores-text: #0b1026;
}

@media (prefers-color-scheme: dark) {
  :root.forge-follows-system:not([data-theme="light"]) {
    --demo-effet-pluie-meteores-bg: #05070f;
    --demo-effet-pluie-meteores-text: #eef1fb;
  }
}

Free component: copy it freely, including for commercial projects.

Visual effects components in WordPress
  • Cards that fade in as they enter the screen, one after another in each row, without a line of JavaScript and with a static fallback.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A translucent card with a saturated blur whose sharper edge refracts the colourful shapes drifting behind it, with an opaque fallback when transparency is reduced.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A help block shaped like a conversation: bubbles, three animated typing dots and clickable quick replies that show your answers to frequent questions, frozen under prefers-reduced-motion.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A paragraph whose words turn from grey to full ink, one by one, as the page scrolls, in pure CSS with a plain-text fallback.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Four offset, translucent sine waves gently roll along the bottom of a section, each at its own pace.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component