Modern CSS Clip-path Effects
Cut images and blocks into polygons, circles, stars and waves, and animate between the shapes.
1Hexagon Scale
Crops avatars or product shots to a hexagon that grows and tilts slightly on hover. Class: fx-hexagon-scale
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<img src="../assets/img/avatar-3.svg" alt="Team member in a hexagon" class="fx-hexagon-scale object-fit-cover" style="width:80px;height:80px"><img src="../assets/img/avatar-7.svg" alt="Second team member in a hexagon" class="fx-hexagon-scale object-fit-cover" style="width:80px;height:80px"><img src="../assets/img/avatar-9.svg" alt="Third team member in a hexagon" class="fx-hexagon-scale object-fit-cover" style="width:80px;height:80px">
</div>
/* CSS (already in assets/css/effects.css) */
.fx-hexagon-scale {
-webkit-clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), filter .45s;
}
.fx-hexagon-scale:hover { transform: scale(1.1) rotate(4deg); filter: saturate(1.3); }
@media (prefers-reduced-motion: reduce) {
.fx-hexagon-scale, .fx-hexagon-scale::before, .fx-hexagon-scale::after, .fx-hexagon-scale *, .fx-hexagon-scale *::before, .fx-hexagon-scale *::after { animation: none !important; transition: none !important; }
}2Star Rotate
A five-point star cut-out that turns slowly and speeds up on hover; use it for ratings or promo badges. Class: fx-star-rotate
<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-star-rotate d-grid" style="width:120px;height:120px;place-items:center;background:linear-gradient(135deg, var(--wt-accent), var(--wt-primary))">
</div>
<img src="https://images.unsplash.com/photo-1758518730083-4c12527b6742?auto=format&fit=crop&w=800&h=800&q=70" alt="Picture cut into a star" class="fx-star-rotate object-fit-cover" style="width:130px;height:130px">
</div>
/* CSS (already in assets/css/effects.css) */
.fx-star-rotate { -webkit-clip-path: polygon(50% 0, 62.3% 33%, 97.6% 34.5%, 70% 56.5%, 79.4% 90.5%, 50% 71%, 20.6% 90.5%, 30% 56.5%, 2.4% 34.5%, 37.7% 33%); clip-path: polygon(50% 0, 62.3% 33%, 97.6% 34.5%, 70% 56.5%, 79.4% 90.5%, 50% 71%, 20.6% 90.5%, 30% 56.5%, 2.4% 34.5%, 37.7% 33%); animation: fx-star-rotate-turn 14s linear infinite; }
.fx-star-rotate:hover { animation-duration: 3s; }
@keyframes fx-star-rotate-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
.fx-star-rotate, .fx-star-rotate::before, .fx-star-rotate::after, .fx-star-rotate *, .fx-star-rotate *::before, .fx-star-rotate *::after { animation: none !important; transition: none !important; }
}3Slide Reveal
Wipes an image or banner in from the left, holds it, then wipes it out to the right. Class: fx-slide-reveal
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<img src="https://images.unsplash.com/photo-1551135049-8a33b5883817?auto=format&fit=crop&w=1200&h=800&q=70" alt="Banner image sliding into view" class="fx-slide-reveal object-fit-cover" style="width:220px;height:150px">
</div>
/* CSS (already in assets/css/effects.css) */
.fx-slide-reveal { -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); animation: fx-slide-reveal-wipe 5s cubic-bezier(.7, 0, .3, 1) infinite; }
@keyframes fx-slide-reveal-wipe {
0% { -webkit-clip-path: inset(0 100% 0 0); clip-path: inset(0 100% 0 0); }
25%, 75% { -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); }
100% { -webkit-clip-path: inset(0 0 0 100%); clip-path: inset(0 0 0 100%); }
}
@media (prefers-reduced-motion: reduce) {
.fx-slide-reveal, .fx-slide-reveal::before, .fx-slide-reveal::after, .fx-slide-reveal *, .fx-slide-reveal *::before, .fx-slide-reveal *::after { animation: none !important; transition: none !important; }
}