Skip to content
animorio
IT
Back to the library

Cloud hero background

Backgrounds, HoverCanvas, GSAP, CSS onlyAdvancedCompressed weight: Demo 15 KBGSAP 28 KBFreeDownload the zip

The first screen of Cumbre Credit, a private credit fund from Madrid: behind the headline a canvas lays three mountain ranges, real black and white photographs with the sky cut away, and five layers of clouds drifting at different speeds, 15, 7, 7, 20 and 25 clouds. Where the cursor passes, a cloud fades, swells by 30 % and slides aside on a soft spring leaving a trail of mist, waits a second and comes back. The headline ‘Capital / to climb / higher’ steps down to the right and a frosted glass card to request financing lands with a bounce.

Rebuilt from scratch studying tresmarescapital.com by Dgrees: the idea is theirs; code, copy and images are ours. Read how it’s made

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Cloud hero background" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>The background of the fund's hero with clouds that move aside from the cursor</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the hero of Cumbre Credit, a private credit fund from Madrid. Behind the words a canvas draws three ranges of
       mountains, real black and white photographs, and five layers of clouds drifting at their own speed; where the cursor passes, the
       clouds fade, swell and slide aside, then come back -->
  <main class="hero" data-hero>
    <canvas class="hero__sky" data-sky aria-hidden="true"></canvas>
    <span class="hero__grain" data-grain aria-hidden="true"></span>

    <header class="bar" data-bar>
      <a class="brand" href="#" aria-label="Cumbre Credit">
        <svg class="brand__mark" viewBox="0 0 34 20" aria-hidden="true">
          <path class="brand__peak" d="M1.5 18.5 9.6 6.2l4.1 6.1"/>
          <path class="brand__peak brand__peak--top" d="M8.6 18.5 18.4 2.2l13.9 16.3"/>
          <path class="brand__snow" d="M15.2 7.6l3.2-5.4 4.6 5.4-2.3-.9-2.3 1.6-1.6-1.4z"/>
        </svg>
        <span class="brand__words"><b>Cumbre</b><small>Credit</small></span>
      </a>
      <nav class="bar__nav" aria-label="Main">
        <a href="#">Solutions</a><a href="#">Portfolio</a><a href="#">Team</a><a href="#">Investors</a>
      </nav>
      <a class="bar__portal" href="#">Investor portal</a>
    </header>

    <h1 class="title" data-title>
      <span class="title__line" style="--i:0"><span class="title__mask"><span class="title__words">Capital</span></span></span>
      <span class="title__line" style="--i:1"><span class="title__mask"><span class="title__words">to climb</span></span></span>
      <span class="title__line" style="--i:2"><span class="title__mask"><span class="title__words">higher</span></span></span>
    </h1>

    <div class="side" data-side>
      <div class="side__words" data-words>
        <p class="side__line">Tailored private credit for fast growing companies and the funds that back them.</p>
        <a class="side__link" href="#">
          <span>Financing solutions</span>
          <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9M8.6 4.4 12.2 8l-3.6 3.6"/></svg>
        </a>
      </div>

      <div class="drop" data-drop>
        <span class="drop__shadow" data-shadow aria-hidden="true"></span>
        <article class="card" data-card>
          <span class="card__sheen" aria-hidden="true"></span>
          <header class="card__head">
            <span class="card__kind">Direct lending</span>
            <span class="card__term">Madrid desk</span>
          </header>
          <h2 class="card__title">Request financing</h2>
          <div class="ticket">
            <div class="ticket__row">
              <span class="ticket__label">Ticket size</span>
              <span class="ticket__range"><span data-low>5</span>&ndash;<span data-high>75</span> M&euro;</span>
            </div>
            <div class="ticket__ruler" data-ruler aria-hidden="true"></div>
            <div class="ticket__ends" aria-hidden="true"><span>0</span><span>100 M&euro;</span></div>
          </div>
          <dl class="facts">
            <div class="facts__row"><dt>Term</dt><dd>3 to 7 years</dd></div>
            <div class="facts__row facts__row--more"><dt>First answer</dt><dd>within 10 days</dd></div>
          </dl>
          <button class="pill" type="button" data-pill>
            <span class="pill__body" aria-hidden="true"></span>
            <span class="pill__words" data-pill-words>
              <span class="pill__say" data-say-a>Start a request</span>
              <span class="pill__say pill__say--b" data-say-b>Request started</span>
            </span>
            <span class="pill__icon" aria-hidden="true">
              <svg viewBox="0 0 16 16">
                <path class="pill__arrow" data-arrow d="M3 8h9M8.6 4.4 12.2 8l-3.6 3.6"/>
                <path class="pill__check" data-check pathLength="1" d="M3.4 8.4l3 3 6.2-6.6"/>
              </svg>
            </span>
          </button>
        </article>
      </div>
    </div>

    <!-- the drawn cursor of the preview: it walks between the clouds by itself until a real pointer shows up -->
    <span class="ghost" data-ghost aria-hidden="true">
      <svg viewBox="0 0 24 24"><path d="M5.2 2.8v16.6l4.3-4.1 2.7 6.2 2.9-1.3-2.7-6.1 6-.4z"/></svg>
    </span>
    <p class="sr" aria-live="polite" data-live></p>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

46 values to change

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Cloud hero background” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

A light grey first screen with a veil of grain moving like film. At the top the Cumbre Credit mark, a summit drawn with two thin strokes and a red snowy tip, the menu and the dark ‘Investor portal’ button. Behind, three mountain ranges that are real black and white photos with the sky cut away: the farthest, a long jagged ridge, almost melted into the haze, in the middle a pyramid of rock and snow with its ridges on the left, greyer, and in front on the right the Matterhorn, the horn of rock with snow in its gullies, darker and closer, its base vanishing in the fog. Between the mountains, five layers of clouds: at the back small and greyer, drifting slowly, then bigger, whiter and faster, down to the white row at the bottom that makes the sea of clouds; those leaving on the right come back on the left. At the start the scene moves in a little and stops; the headline ‘Capital / to climb / higher’ rises from its masks and every line slides one step to the right; after a second a gust runs along the bottom and the low clouds fade one after the other, left to right, and come back. On the right the line and the link with the arrow, then the frosted glass card falls, touches, bounces a few pixels and settles as its shadow tightens; inside, ‘Direct lending’, ‘Request financing’, the ticket ruler whose ticks stand up and turn dark from 5 to 75 while the figures count, the term and the answer time and the red ‘Start a request’ pill. Then a drawn cursor passes among the clouds: where it goes they move aside, fade and swell leaving a trail of mist, and come back a second later; the mountains follow it very slowly. At the end the cursor goes to the pill, which widens with its words and arrow, and presses it: ‘Request started’ with a check, then back as it was.

How it works

Three real photos with the sky cut away

The mountains are three CC0 photographs, already black and white and with the sky removed (the alpha channel of the webp): a far ridge, a pyramid in the middle and the Matterhorn in front. At the start, and only when the size really changes, each photo goes into an offscreen canvas as big as its layer, with the summit where it belongs and at least as wide as the screen; if it ends before the bottom, its last row is stretched. Then, with source-atop, a veil the colour of the haze (thicker for the far ones), the fog rising from the base and, with destination-out, the base melting into transparency. Every frame is just drawImage.

Five layers of clouds as on the site

15, 7, 7, 20 and 25 clouds at depths 1.2, 1, 0.9, 0.65 and 0.35: the farther they are, the higher, smaller, greyer and slower. The clouds are five sprites made on canvas from three families of puffs (bodies, cauliflower heads, curls), eroded by noise, lit from above (the more cloud above, the greyer) and slightly blurred. Each layer is drawn right after its range, so the clouds pass between the mountains; leaving on the right they come back on the left.

The blow: a spring and a clock

Each cloud has a value from 0 to 1 pulled by a soft spring towards its goal: when the cursor is within the radius the goal becomes 1 for one second plus the wait (HOLD), then 0 again. The value takes away opacity and swells the cloud by 30 %; another spring moves it away from the cursor and a little along its direction, and three puffs of mist leave with the cursor and melt: the trail.

The very slow parallax

The mouse does not move the scene directly: a value chases it with a lerp of 0.01 per frame (corrected for real time), and each layer moves by PARALLAX times its depth. So the mountains follow the pointer a few seconds late, like a landscape seen from a train.

The stepped headline and the card that lands

Each line of the headline moves by --k times --step (5vw, twice on a phone) and GSAP takes --k from 0 to its index in 2.2 s expo.out, as on the site: there is nothing to work out again on resize. The card falls in 0.55 s power2.in, bounces 7 and then 1.5 pixels while the shadow beneath widens at every touch; the red pill swells on the elastic curve and its words widen on the wdth axis of Mona Sans.

Values to change

NameFileDefaultWhat it changes
RADIUSscript.js150How far from the cursor the clouds move aside, in pixels on a 1440 wide screen.
SWELLscript.js0.3How much a cloud swells while it fades: 0.3 is 30 %.
HOLDscript.js1Seconds a cloud stays away before coming back.
DRIFTscript.js1How fast the clouds drift: 2 twice as fast, 0 still.
DENSITYscript.js1How many clouds: 1 is the 15, 7, 7, 20 and 25 of the five layers.
PARALLAXscript.js34How far the mountains follow the pointer, in pixels.
STEPscript.js5The step of each line of the headline, in vw (almost twice on a phone).
GRAINscript.js0.4How visible the film grain is (0 none).

Try them in the Playground

When to use it

For the first screen of a fund, a private bank, an advisory firm, a mountain hotel or a lodge: when the brand speaks of climbing, air and calm and you want a living background behind a big headline that answers the mouse without pulling the eye away from the button.

On phones

The same scene with adapted sizes: the ranges become wider than the screen and are cropped at the sides, so the mountains stay mountains and not needles; the clouds are also sized on the height; the headline sits at the top with an almost double step, the card below on the right, the line over the card only if there is room, and in low boxes the card drops its extra rows. With a finger the clouds move aside as with the mouse.

With reduced motion

Mountains and clouds still, with no parallax and no zoom; the headline already stepped, the card, line and mark fading in, the ruler already dark. Where the pointer passes the clouds only fade, without swelling or moving, and the drawn cursor does not start.

Pitfalls

  • The photos are never read pixel by pixel: veil, fog and melting base are fills with source-atop and destination-out, so the canvas never asks for getImageData and the demo also works opened from the zip, from file://, where a local photo taints the canvas.
  • Each layer must end by melting into transparency, not into the fog colour: a solid grey bottom over the hero's slightly different background leaves a straight line where the layer ends.
  • On a tall narrow phone screen a photo sized only on the width would leave the sides bare: its width is at least what it takes to cover the screen on both sides of the summit, and the range is at least 1.45 times as wide as the height.
  • The distance check from the cursor must count the cloud's size only a little (a tenth of its width): otherwise, with the big front clouds, one blow empties half the screen.
  • The pill's changing label is moved by GSAP with yPercent: a translateY in the CSS would add up and the two labels would end up on top of each other.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 15 KB; the libraries: GSAP 28 KB.

Testing

Tested on 6 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All animations