Backgrounds✨ Premium

Thermal Vision

Four CSS thermal zones power a hover-reactive heat map — from incandescent white to glacial blue, with zero JavaScript.

CSSHoverGradient

You'll get access to the interactive demo with a free account.

This effect is part of Effect.Labs — 811 vanilla effects, some free, some premium. Backgrounds has 50 effects, including 6 free. Explore the category →

3 usage examples

Monitoring dashboard — Server node cluster — Thermal Vision example 1

① Monitoring dashboard — Server node cluster

WhenAn operator checks the thermal state of a cluster in real time from an admin panel.
WhyThe infrared palette conveys load severity instantly without a legend: white-red = critical alert, blue = idle healthy node. Hovering triggers a natural visual scan that invites exploration.
SettingsLabel each object (CPU, GPU, RAM, DISK) by overlaying an absolute <span>. Map thermal-hot to the most critical node and thermal-cold to the idle resource.
Smart-home widget — Room temperatures — Thermal Vision example 2

② Smart-home widget — Room temperatures

WhenA home automation app dashboard shows each room's temperature sensor at a glance.
WhyEach thermal zone represents a room (warm living room, cool bedroom, cold cellar) — the user reads the ambience without scanning a single number.
SettingsArrange the 4 objects in a 2×2 grid (display: grid; grid-template-columns: 1fr 1fr; gap: 24px), scale to 70×70 px, and add a text label below each object.
Hero section — Sci-fi infrared scanner — Thermal Vision example 3

③ Hero section — Sci-fi infrared scanner

WhenLanding page for a deeptech startup or cybersecurity tool aiming for a technical, immersive aesthetic from the first screen.
WhyThe hover interaction creates an agency moment — the user triggers the thermal scan themselves. The 0.5 s transition feels responsive enough to be snappy, slow enough to feel precise.
SettingsObjects at 90×90 px, gap: 32px, background: #000 on .thermal-scene, blur(20px) on ::after for a more dramatic radiance.

How it works

The effect is built entirely in pure CSS — no JavaScript. Four <div> elements each carry a temperature class (thermal-hot, thermal-warm, thermal-cool, thermal-cold) with a radial gradient mimicking the infrared palette: white at the burning core, yellow-orange at the hot edges, then blue-cyan for cool and deep navy for cold.

Each object has an ::after pseudo-element at position: absolute; inset: -8px, inheriting the same gradient and filtered with filter: blur(12px). This soft halo simulates thermal diffusion as seen in real infrared imaging — radiation bleeds beyond the object's physical boundary.

On container hover (.thermal-container:hover), hot zones expand (scale(1.3) for hot, scale(1.15) for warm) and gain colored box-shadow layers simulating energy emission. Cold zones contract (scale(0.9) and scale(0.8)) with a less intense blue halo — physical coherence in pure CSS.

All transitions are driven by a single transition: .5s on .thermal-object and .thermal-object::after, covering transform, box-shadow, opacity, and inset in one declaration. The status label (.thermal-label) also transitions its color from 40% to 80% opacity.

Accessibility

  • prefers-reduced-motion not handled: the effect does not check this preference — 0.5 s transitions always run. For WCAG 2.1 §2.3 compliance, add @media (prefers-reduced-motion: reduce) { .thermal-object, .thermal-object::after, .thermal-label { transition: none; } }.
  • Hover-only interaction: no :focus state triggers the effect — keyboard-only users cannot activate it. Minimal fix: add tabindex="0" to .thermal-container and extend selectors to :hover, :focus-within.
  • The four zones are color-coded only — no alternative text or pattern. For functional use (alerts, thresholds), add an aria-label or visible text label per zone for colorblind users.
  • The .thermal-label text ('hover to activate thermal scan') is at 40% opacity at rest — contrast ratio below WCAG AA 4.5:1. It passes at hover (80%), but the resting state is non-compliant.
  • No ARIA roles are defined on the effect's elements. The container may receive role="img" and aria-label to describe the scene to screen readers.

Browser compatibility

Requires CSS gradients, filter: blur(), transform, and CSS transitions — supported in all modern browsers since 2016.

Chrome 40+✓ Full
Firefox 35+✓ Full
Safari 9+✓ Full
Edge 79+✓ Full
Mobile iOS✓ Full (touch hover simulated)
Android Chrome✓ Full (touch hover simulated)

Without <code>filter: blur()</code> (IE 11), the glows disappear but the thermal gradients remain visible — the effect stays readable, just less immersive. No JS errors.

The code

HTML structure to paste into your page (CSS + JS available with a premium account):

index.html — structure
<div class="thermal-container">
  <div class="thermal-scene">
    <div class="thermal-object thermal-hot"></div>
    <div class="thermal-object thermal-warm"></div>
    <div class="thermal-object thermal-cool"></div>
    <div class="thermal-object thermal-cold"></div>
    <div class="thermal-label">hover to activate thermal scan</div>
  </div>
</div>
🔒 Unlock the full code — from €2.99 the first month

Full HTML + CSS + JS, copy-paste ready — with hundreds of premium effects.

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
.thermal-hot { background } radial-gradient(circle, #fff, #ff0, #f80, red) Gradient stops for the hottest zone. Change colors to adjust the range (e.g. start at yellow if white is too intense, or reverse for a cold-to-hot mapping).
.thermal-object { width / height } 60px Zone size. Go up to 90-120 px for a full-screen hero, down to 40 px for a compact widget or dense grid.
.thermal-object::after { filter: blur() } blur(12px) Thermal diffusion radius. Increase to 24-32 px for a diffuse glow on a large dark background; reduce to 6 px for a tighter outline.
.thermal-container:hover .thermal-hot { transform } scale(1.3) Hot zone expansion on hover. Reduce to scale(1.15) for a subtler response; push to scale(1.5) for a dramatic effect.
.thermal-object { transition } 0.5s Transition duration. Slow to 1.2 s for a cinematic scan; speed up to 0.15 s for a near-instant response.
.thermal-scene { background } #0a0020 Scene background. Use #000 for pure infrared black or #0a0a0f to blend with the Effect.Labs dark standard.
.thermal-scene { gap } 16px Spacing between zones. Increase to 32-48 px for an airy composition, reduce to 8 px for a compact cluster.

FAQ

Yes, the effect is 100% CSS — no script required. Copy the HTML and CSS and you're done. It has no external dependencies and integrates cleanly into any framework (React, Vue, Svelte) as a static component or by dynamically toggling classes.
Add tabindex="0" to .thermal-container and extend all .thermal-container:hover selectors to .thermal-container:hover, .thermal-container:focus-within. Users can then trigger the thermal scan with Tab alone — :focus-within is enough, no Enter key required.
The native effect relies on :hover — there are no CSS keyframes. For an auto-loop, add @keyframes to transform and box-shadow for each class, or trigger the hover state in JavaScript by toggling an .active class on .thermal-container.