Skip to content

Layered snowfall in WordPress

Three layers of snowflakes fall at different speeds, pushed by an adjustable wind, while snow piles up at the bottom of the block, 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-neige-hiver-parallaxe-flocons-multicouches.php
<?php
/**
 * Plugin Name: Forge, Chute de neige en couches
 * Description: Trois couches de flocons tombent à des vitesses différentes, poussées par un vent réglable, et la neige s’accumule au bas du bloc, en CSS pur. Ajoute la composition « Chute de neige en couches » à 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-neige-hiver-parallaxe-flocons-multicouches
 *
pattern.html
<!-- wp:group {"tagName": "section", "className": "efnp", "layout": {"type": "default"}} -->
<section class="wp-block-group efnp"><!-- wp:html -->
<span class="efnp__sky" aria-hidden="true">
          <span class="efnp__layer efnp__layer--far">
            <span class="efnp__lane efnp__lane--far-1"><span class="efnp__flake"></span></span>
            <span class="efnp__lane efnp__lane--far-2"><span class="efnp__flake"></span></span>
            <span class="efnp__lane efnp__lane--far-3"><span class="efnp__flake"></span></span>
            <span class="efnp__lane efnp__lane--far-4"><span class="efnp__flake"></span></span>
            <span class="efnp__lane efnp__lane--far-5"><span class="efnp__flake"></span></span>
            <span class="efnp__lane efnp__lane--far-6"><span class="efnp__flake"></span></span>
            <span class="efnp__lane efnp__lane--far-7"><span class="efnp__flake"></span></span>
            <span class="efnp__lane efnp__lane--far-8"><span class="efnp__flake"></span></span>
style.css
:root {
  --efnp-top: #4f86e8;
  --efnp-bottom: #c4b5fd;
  --efnp-glow: rgb(251 191 36 / 0.45);
  --efnp-flake: #ffffff;
  --efnp-snow: #ffffff;
  --efnp-shade: #bfd3f5;
  --efnp-card: rgb(255 255 255 / 0.88);
  --efnp-border: rgb(30 58 138 / 0.2);
  --efnp-text: #172554;
  --efnp-body: #1e3a8a;
  --efnp-accent: #b91c1c;

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