Modern CSS Transform Effects
2D and 3D transforms - tilts, cubes, perspective and chained motion - driven only by hover and keyframes.
13D Card Tilt
Tilts a card in 3D with a moving glare on hover - a pure CSS take on the mouse-follow tilt. Class: fx-3d-card-tilt
How to choose the right project
$212.70
<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 border-0 shadow-sm fx-3d-card-tilt" style="width:12rem">
<img src="https://images.unsplash.com/photo-1752650736677-94fe8cdb9d5c?auto=format&fit=crop&w=1200&h=800&q=70" alt="Card cover" class="card-img-top object-fit-cover" style="height:100px">
<div class="card-body py-2">
<h3 class="h6 mb-0">How to choose the right project</h3>
<p class="small text-body-secondary mb-0">$212.70</p>
</div>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-3d-card-tilt {
position: relative; overflow: hidden; transform-style: preserve-3d;
transform: perspective(900px) rotateX(0deg) rotateY(0deg);
transition: transform .55s cubic-bezier(.2, .8, .2, 1), box-shadow .55s;
}
.fx-3d-card-tilt::after {
content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 48%, transparent 62%);
transform: translateX(-60%); transition: transform .7s ease, opacity .4s;
}
.fx-3d-card-tilt:hover, .fx-3d-card-tilt:focus-within {
transform: perspective(900px) rotateX(8deg) rotateY(-12deg) translateY(-4px);
box-shadow: 18px 22px 40px -18px rgba(var(--wt-primary-rgb), .55);
}
.fx-3d-card-tilt:hover::after, .fx-3d-card-tilt:focus-within::after { opacity: 1; transform: translateX(60%); }
@media (prefers-reduced-motion: reduce) {
.fx-3d-card-tilt, .fx-3d-card-tilt::before, .fx-3d-card-tilt::after, .fx-3d-card-tilt *, .fx-3d-card-tilt *::before, .fx-3d-card-tilt *::after { animation: none !important; transition: none !important; }
}2Matrix Transform
Uses a single matrix() to scale, skew and lift a tile at once on hover. Class: fx-matrix-transform
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<a href="#" class="fx-matrix-transform d-block text-decoration-none rounded-4 p-4 text-white" style="width:13rem;background:linear-gradient(135deg, var(--wt-primary), var(--wt-secondary))">
<div class="fs-2">
<i class="bi bi-bounding-box" aria-hidden="true"></i>
</div>
<div class="fw-semibold">
Motion graphics
</div>
<div class="small opacity-75">
Hover me
</div>
</a>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-matrix-transform { transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), box-shadow .5s; }
.fx-matrix-transform:hover, .fx-matrix-transform:focus-visible { transform: matrix(1.05, -.08, .12, 1.05, 0, -8); box-shadow: 0 20px 30px -16px rgba(var(--wt-primary-rgb), .5); }
@media (prefers-reduced-motion: reduce) {
.fx-matrix-transform, .fx-matrix-transform::before, .fx-matrix-transform::after, .fx-matrix-transform *, .fx-matrix-transform *::before, .fx-matrix-transform *::after { animation: none !important; transition: none !important; }
}