Modern CSS Gradient Effects
Animated, mesh, conic and text gradients built from the theme colours.
1Animated Rainbow
A full-spectrum gradient that flows endlessly across banners, buttons and progress bars. Class: fx-animated-rainbow
Fitness for every body
Every colour, always moving.
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<div class="fx-animated-rainbow rounded-4 p-4 text-center w-100" style="max-width:18rem;text-shadow:0 1px 3px rgba(0,0,0,.3)">
<h3 class="h5 fw-bold mb-1">Fitness for every body</h3>
<p class="small mb-0">Every colour, always moving.</p>
</div>
<button type="button" class="btn rounded-pill border-0 fx-animated-rainbow">Celebrate</button>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-animated-rainbow {
color: #fff;
background: linear-gradient(90deg, #ff3d7f, #ff9f1c, #ffd23f, #3bce73, #2ec4ff, #7b5cff, #ff3d7f);
background-size: 300% 100%;
animation: fx-animated-rainbow-flow 8s linear infinite;
}
@keyframes fx-animated-rainbow-flow { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) {
.fx-animated-rainbow, .fx-animated-rainbow::before, .fx-animated-rainbow::after, .fx-animated-rainbow *, .fx-animated-rainbow *::before, .fx-animated-rainbow *::after { animation: none !important; transition: none !important; }
}2Mesh Gradient
Soft blobs of the theme colours blended into a slowly drifting mesh - perfect for hero panels. Class: fx-mesh-gradient
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<div class="fx-mesh-gradient rounded-4 p-4 w-100" style="max-width:19rem">
<span class="badge text-bg-light mb-2">Strength</span>
<h3 class="h5 fw-bold mb-2">Classes that keep you coming back</h3>
<a href="#" class="btn btn-light btn-sm">Get started</a>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-mesh-gradient {
background-color: var(--wt-primary);
background-image:
radial-gradient(at 15% 20%, var(--wt-accent) 0, transparent 55%),
radial-gradient(at 85% 15%, var(--wt-secondary) 0, transparent 50%),
radial-gradient(at 75% 85%, var(--wt-accent) 0, transparent 50%),
radial-gradient(at 20% 90%, var(--wt-secondary) 0, transparent 55%);
background-size: 160% 160%;
color: var(--wt-on-primary, #fff);
animation: fx-mesh-gradient-drift 14s ease-in-out infinite alternate;
}
@keyframes fx-mesh-gradient-drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@media (prefers-reduced-motion: reduce) {
.fx-mesh-gradient, .fx-mesh-gradient::before, .fx-mesh-gradient::after, .fx-mesh-gradient *, .fx-mesh-gradient *::before, .fx-mesh-gradient *::after { animation: none !important; transition: none !important; }
}