Skip to content

Animated diagonal lines background in WordPress

Diagonal stripes scroll continuously behind a section, made of repeating CSS gradients, with a fade behind the text.

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-fond-lignes-diagonales-animees.php
<?php
/**
 * Plugin Name: Forge, Fond de lignes diagonales animées
 * Description: Des bandes diagonales défilent en continu derrière une section, en dégradés répétitifs CSS, avec un fondu derrière le texte. Ajoute la composition « Fond de lignes diagonales animées » à 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-fond-lignes-diagonales-animees
 *
pattern.html
<!-- wp:group {"tagName": "section", "className": "efdg", "layout": {"type": "default"}} -->
<section class="wp-block-group efdg"><!-- wp:html -->
<span class="efdg__bands" aria-hidden="true"></span>
<!-- /wp:html -->
<!-- wp:html -->
<span class="efdg__lines" aria-hidden="true"></span>
<!-- /wp:html -->
<!-- wp:group {"className": "efdg__copy", "layout": {"type": "default"}} -->
<div class="wp-block-group efdg__copy"><!-- wp:paragraph {"className": "efdg__eyebrow"} -->
<p class="efdg__eyebrow">Atelier Biseau · Signalétique à Nantes</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "efdg__title", "anchor": "efdg-titre"} -->
style.css
:root {
  --efdg-band-a: #fff7ed;
  --efdg-band-b: #ffe8cc;
  --efdg-line: rgb(251 146 60 / 0.28);
  --efdg-text: #431407;
  --efdg-body: #9a3412;
  --efdg-accent: #c2410c;
  --efdg-on-accent: #ffffff;
  --efdg-chip: rgb(255 247 237 / 0.9);
  --demo-effet-fond-lignes-diagonales-animees-bg: #fffbf7;
  --demo-effet-fond-lignes-diagonales-animees-text: #431407;
}

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