Modern CSS Gradient Effects
Animated, mesh, conic and text gradients built from the theme colours.
1Animated Border
A gradient border that rotates around a card or button; browsers without @property show it still. Class: fx-animated-border
Studio plan
$35.06 / month
<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-animated-border" style="width:13rem">
<div class="card-body text-center">
<div class="fs-2 text-primary">
<i class="bi bi-trophy-fill" aria-hidden="true"></i>
</div>
<h3 class="h6 mb-1">Studio plan</h3>
<p class="small text-body-secondary mb-0">$35.06 / month</p>
</div>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
@property --fx-animated-border-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.fx-animated-border {
border: 3px solid transparent;
background:
linear-gradient(var(--wt-surface, #fff), var(--wt-surface, #fff)) padding-box,
conic-gradient(from var(--fx-animated-border-angle), var(--wt-primary), var(--wt-accent), var(--wt-secondary), var(--wt-primary)) border-box;
animation: fx-animated-border-turn 4s linear infinite;
}
@keyframes fx-animated-border-turn { to { --fx-animated-border-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) {
.fx-animated-border, .fx-animated-border::before, .fx-animated-border::after, .fx-animated-border *, .fx-animated-border *::before, .fx-animated-border *::after { animation: none !important; transition: none !important; }
}2Gradient Text
Paints any heading with a slowly shifting gradient of the primary, accent and secondary colours. Class: fx-gradient-text
Learn new skills at your own pace
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<h2 class="h1 fw-bold text-center mb-0 fx-gradient-text">Learn new skills at your own pace</h2>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-gradient-text {
color: var(--wt-primary-ink);
background-image: linear-gradient(90deg, var(--wt-primary), var(--wt-accent), var(--wt-secondary), var(--wt-primary));
background-size: 200% auto;
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent;
animation: fx-gradient-text-shift 6s linear infinite;
}
@keyframes fx-gradient-text-shift { to { background-position: -200% center; } }
@media (prefers-reduced-motion: reduce) {
.fx-gradient-text, .fx-gradient-text::before, .fx-gradient-text::after, .fx-gradient-text *, .fx-gradient-text *::before, .fx-gradient-text *::after { animation: none !important; transition: none !important; }
}3Moving Stripes
Animated diagonal stripes for progress bars, sale banners and "in progress" states. Class: fx-moving-stripes
Flash deal
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<div class="w-100" style="max-width:18rem">
<div class="fx-moving-stripes rounded-3 p-3 text-center fw-bold mb-3">
Flash deal
</div>
<div class="progress" role="progressbar" aria-label="Upload progress" aria-valuenow="83" aria-valuemin="0" aria-valuemax="100">
<div class="progress-bar fx-moving-stripes" style="width:83%">
83%
</div>
</div>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-moving-stripes {
background-color: var(--wt-primary);
background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .22) 0 12px, transparent 12px 24px);
background-size: 34px 34px;
color: var(--wt-on-primary, #fff);
animation: fx-moving-stripes-move 1s linear infinite;
}
@keyframes fx-moving-stripes-move { to { background-position: 34px 0; } }
@media (prefers-reduced-motion: reduce) {
.fx-moving-stripes, .fx-moving-stripes::before, .fx-moving-stripes::after, .fx-moving-stripes *, .fx-moving-stripes *::before, .fx-moving-stripes *::after { animation: none !important; transition: none !important; }
}