FINDING YOUR DIRECTION

0%
← Scrollhaus Journal

Website Motion · Published · Updated · 7 min read

Animated Website Backgrounds: Free Examples, CSS and Video

Choose a moving background by format, try real examples and build a readable page that works when motion is paused or unavailable.

Published by Amanjot Singh, founder of Scrollhaus. AI-assisted editorial work; product context, sources and corrections are documented in our editorial methodology.

Luminous lavender and blue animated background flowing through a transparent browser frame in a dark gallery
Scrollhaus Journal · Website Motion

An animated website background is a moving layer behind a page’s main content. It can be a CSS gradient, a finished video loop, a Canvas effect or an interactive WebGL scene. Start with the visitor’s task: the right background helps explain the page while the headline, navigation and next action remain easy to use.

For a quick starting point, browse animated and moving backgrounds on Scrollhaus. The collection separates video, still-image and interactive resources. A still image will not animate, and a video that looks three-dimensional is not an object a visitor can rotate.

Choose CSS, video or interactive 3D

What you needStart withCheck before building
Quiet colour behind a SaaS headlineA CSS gradient or a few transformed shapesText contrast, pause control and a still state
Liquid, fabric, landscape or directed lightingA finished video backgroundActual footage, poster, crop and the join between loops
Particles or geometry that responds to a pointerCanvas or a real WebGL scenePhone input, GPU work and a fallback if rendering fails
A product transformation controlled by scrollingA scroll-driven image sequence or timelineLoading order, frame quality and normal document scrolling
A readable pricing table, form or long articleA still backgroundHierarchy and contrast before adding movement

“Motion background” describes a visual role rather than a file format. Choose the medium after deciding whether the scene needs to loop, follow a pointer or respond to scrolling. Avoid combining all three simply because a builder can generate them.

Four examples you can inspect before you build

Use a real preview with your proposed headline. Watch the complete loop, including its busiest and brightest frames, then check the same composition on a phone. These examples offer different kinds of handoff:

Scrollhaus currently includes 66 free video backgrounds, 272 still images and a separate collection of 64 interactive backgrounds, 20 of which are free. The interactive free selection includes 14 Vanta scenes. The interactive collection and the 3D background guide help distinguish real interaction from rendered footage.

What “free animated backgrounds” includes

A free preview, a downloadable media file and permission for commercial use are different things. Check the licence for the individual asset and its source. Scrollhaus’s OpenHero collection credits the upstream project; its application-code licence does not automatically grant unrestricted rights to every image or clip. Vanta’s code is available under its own MIT licence.

For a client website, keep the resource URL, licence and acquisition date with the project. Check fonts, photographs, music and video separately. If you cannot establish the rights to a particular file, choose another asset before presenting the build as ready to publish. Our Template Licence explains the terms for Scrollhaus resources; third-party resources retain their own conditions.

A small CSS animated background with a pause control

For soft colour movement, use a decorative layer inside a section that already has a stable size. Keep the headline and call to action in normal HTML above it. The complete working example contains the colour layers and layout. Its key behaviour is:

.ambient-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 32rem;
}
.ambient-layer {
  position: absolute;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  animation: drift 16s ease-in-out infinite alternate;
}
#pause:checked ~ .ambient-layer { animation-play-state: paused; }
@keyframes drift {
  from { transform: translate(-3%, -2%) rotate(-4deg); }
  to { transform: translate(3%, 2%) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-layer { animation: none; }
}

The pause checkbox must appear before the animated layer at the same nesting level for this sibling selector to work. Hide the decorative layer from assistive technology and leave the control labelled. Transforming the background layer lets the surrounding content retain its layout; it does not guarantee good performance on every device.

Add a video background without losing the first screen

Choose a sharp poster that works as a complete still composition. Reserve the section’s height and place the video behind the content with an overlay where necessary. Use muted inline playback for decorative video, and handle a rejected play request by retaining the poster and a usable play control. Browser policy can block autoplay even when the markup requests it.

Check the mobile crop against the actual subject. Do not stretch the footage or lower its source quality to disguise a performance problem. Prioritize the visible hero, defer later media and pause work outside the viewport or while the tab is hidden. Measure the deployed page on a representative phone; a smooth desktop preview is not a mobile performance result.

For automatic motion lasting more than five seconds alongside other content, provide a way to pause, stop or hide it where required by W3C’s Pause, Stop, Hide guidance. Also respect the reduced-motion preference. A visitor should not have to watch an animation to read the offer or reach a button.

Use a specific background brief in an AI builder

Supply the chosen asset rather than asking the model to invent one. This starting brief works for a video-based hero; replace both placeholders before using it:

Build a responsive React and TypeScript hero. Keep the heading and primary action in semantic HTML. Use [VIDEO_URL] behind the content with [POSTER_URL] as the readable first state. Preserve the source colours and aspect ratio. Include muted inline playback, a visible pause/resume control and a stable contrast overlay. Show the poster when reduced motion is requested or playback fails. Reserve the hero’s size, keep native page scrolling and do not preload videos in later sections. Do not invent URLs, testimonials or working backend integrations.

For a CSS or WebGL effect, replace the video instructions with the actual technique and fallback. Find more AI website prompts by niche, or use the website design prompt examples to specify the rest of the page.

Why is my animated background not moving?

SymptomFirst checkUseful next step
Only a still image appearsIs the selected resource an image, a poster or a video?Confirm the file type and inspect the actual asset response.
Video works only after a clickMuted playback, inline playback and browser autoplay policyKeep a user-controlled play option and a complete poster state.
The effect is deliberately stillReduced-motion preference and the page’s pause controlRespect the visitor’s choice instead of forcing animation.
The canvas is blankScript errors, dependencies and WebGL availabilityRetain a CSS or image fallback while diagnosing the scene.
The phone feels slowConcurrent players, offscreen work and scene complexityPause unused work, simplify optional effects and measure again.

Finally, test the opening state, middle of the loop, loop join, paused state and failed-load state with the real content. Check keyboard focus, headline contrast, phone scrolling and the primary action in each. Use the motion performance guide for loading and measurement, or browse AI website templates if a complete page structure is the larger problem.

Code walkthroughs: animated gradient backgrounds and animated backgrounds in Next.js.

Frequently asked questions

Where can I find free animated website backgrounds?

Scrollhaus includes free video backgrounds, still images and selected interactive effects, plus a CSS-only working example. Check the rights and available handoff for each asset before commercial use.

Should I use CSS, video or WebGL for a moving background?

Use CSS for quiet gradients and simple shapes, video for finished footage, and WebGL when pointer interaction or real 3D is important. Keep a usable still state and measure the result on a phone.

Why is my animated website background not moving?

Check that the resource is a video or code effect, inspect the asset response, and review autoplay, reduced motion and pause settings. Script or WebGL errors can also leave a canvas blank.

Can I use animated backgrounds in an AI website builder?

Yes. Supply the actual asset and poster URLs, specify the motion trigger and fallback, and test the generated page for contrast, pause controls, mobile behaviour and failed media loading.

Explore animated website templates at Scrollhaus →

Need help with a template, account, or project? Email admin@scrollhaus.ai.