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
Book a doctor in minutes
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">Book a doctor in minutes</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; }
}2Aurora Hover
Northern-lights colour clouds that drift inside a card and brighten when it is hovered. Class: fx-aurora-hover
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<div class="card fx-aurora-hover" style="width:15rem">
<div class="card-body">
<h3 class="h6 fw-bold mb-1">Same-day appointments</h3>
<p class="small text-body-secondary mb-2">Our physiotherapy lets every detail in view in just a few clicks.</p>
<a href="#" class="btn btn-primary btn-sm">Details</a>
</div>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-aurora-hover { position: relative; isolation: isolate; overflow: hidden; }
.fx-aurora-hover::before {
content: ""; position: absolute; inset: -40%; z-index: -1; pointer-events: none; opacity: .35;
background:
radial-gradient(closest-side at 30% 40%, rgba(var(--wt-primary-rgb), .9), transparent),
radial-gradient(closest-side at 70% 30%, rgba(var(--wt-accent-rgb), .8), transparent),
radial-gradient(closest-side at 55% 70%, rgba(var(--wt-secondary-rgb), .8), transparent);
filter: blur(24px);
transition: opacity .6s ease;
animation: fx-aurora-hover-drift 12s ease-in-out infinite alternate;
}
.fx-aurora-hover:hover::before, .fx-aurora-hover:focus-within::before { opacity: .85; }
@keyframes fx-aurora-hover-drift {
from { transform: translate(-6%, -4%) rotate(0deg); }
to { transform: translate(6%, 5%) rotate(25deg); }
}
@media (prefers-reduced-motion: reduce) {
.fx-aurora-hover, .fx-aurora-hover::before, .fx-aurora-hover::after, .fx-aurora-hover *, .fx-aurora-hover *::before, .fx-aurora-hover *::after { animation: none !important; transition: none !important; }
}