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
Ideas on stage, connections everywhere
Every colour, always moving.
<div class="flex flex-wrap items-center justify-center gap-4 p-4 h-full" style="min-height:200px">
<div class="fx-animated-rainbow rounded-xl p-6 text-center w-full" style="max-width:18rem;text-shadow:0 1px 3px rgba(0,0,0,.3)">
<h3 class="h5 font-bold mb-1">Ideas on stage, connections everywhere</h3>
<p class="small mb-0">Every colour, always moving.</p>
</div>
<button type="button" class="btn rounded-full 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; }
}2Iridescent
A holographic, pearly sheen that shifts its colours as the card is hovered. Class: fx-iridescent
Zeni Studio
**** **** **** 5500
Samir Tanaka
<div class="flex flex-wrap items-center justify-center gap-4 p-4 h-full" style="min-height:200px">
<div class="fx-iridescent rounded-xl p-6 shadow-sm" style="width:15rem">
<div class="flex justify-between items-start mb-6">
<span class="font-bold">Zeni Studio</span><i class="bi bi-gem" aria-hidden="true"></i>
</div>
<div class="font-mono small mb-1">
**** **** **** 5500
</div>
<div class="small">
Samir Tanaka
</div>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-iridescent {
position: relative; overflow: hidden; color: #1d1d2b;
background: linear-gradient(120deg, #f6d5f7, #fbe9d7, #d5f2ef, #d7e2fb, #e9d5fb, #f6d5f7);
background-size: 300% 300%; background-position: 0% 50%;
transition: background-position 1.2s ease;
}
.fx-iridescent::after {
content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay;
background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%);
background-size: 250% 100%; background-position: 100% 0; transition: background-position 1.2s ease;
}
.fx-iridescent:hover, .fx-iridescent:focus-within { background-position: 100% 50%; }
.fx-iridescent:hover::after, .fx-iridescent:focus-within::after { background-position: 0 0; }
@media (prefers-reduced-motion: reduce) {
.fx-iridescent, .fx-iridescent::before, .fx-iridescent::after, .fx-iridescent *, .fx-iridescent *::before, .fx-iridescent *::after { animation: none !important; transition: none !important; }
}3Text Mask
Large text that works as a window onto a moving gradient - or onto an image set with an inline background-image. Class: fx-text-mask
BOLD
Discover
<div class="flex flex-wrap items-center justify-center gap-4 p-4 h-full" style="min-height:200px">
<div class="text-center">
<div class="display-3 font-bold leading-none fx-text-mask">
BOLD
</div>
<div class="display-5 font-bold leading-none fx-text-mask" style="--fx-mask-img:initial;background-image:url(https://images.unsplash.com/photo-1770097286213-6d6fc60f4cdf?auto=format&fit=crop&w=1200&h=800&q=70)">
Discover
</div>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-text-mask {
color: var(--wt-primary-ink);
background-image: var(--fx-mask-img, linear-gradient(135deg, var(--wt-primary) 0%, var(--wt-accent) 30%, var(--wt-secondary) 60%, var(--wt-primary) 100%));
background-size: cover; background-position: 0% 50%;
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent;
animation: fx-text-mask-pan 10s ease-in-out infinite alternate;
}
.fx-text-mask:not([style*="--fx-mask-img"]) { background-size: 300% 300%; }
@keyframes fx-text-mask-pan { to { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) {
.fx-text-mask, .fx-text-mask::before, .fx-text-mask::after, .fx-text-mask *, .fx-text-mask *::before, .fx-text-mask *::after { animation: none !important; transition: none !important; }
}