Advanced CSS Animations
Push the boundaries with 3D transforms, particle systems, SVG animations, and performance optimization
Advanced Techniques
Push the boundaries with complex animations and performance optimisations.
3D Card Flip
Front Side
Hover to flip
Back Side
Hidden content!
/* 3D card flip */
.flip-card {
perspective: 1000px;
}
.flip-card-inner {
transform-style: preserve-3d;
transition: transform 0.6s;
}
.flip-card:hover .flip-card-inner {
transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
position: absolute;
backface-visibility: hidden;
}
.flip-card-back {
transform: rotateY(180deg);
}
Particle System
@keyframes rise {
to {
transform: translateY(-100vh);
opacity: 0;
}
}
.particle {
position: absolute;
animation: rise 10s infinite;
}
/* Random positions and delays */
.particle:nth-child(1) {
left: 10%;
animation-delay: 0s;
}
.particle:nth-child(2) {
left: 30%;
animation-delay: 2s;
}
SVG Path Animation
/* SVG path animation */
.svg-path {
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
animation: draw 3s ease-in-out infinite;
}
@keyframes draw {
to {
stroke-dashoffset: 0;
}
}
Animation Best Practices
Use Transform & Opacity
These properties are GPU-accelerated and provide the smoothest animations.
will-change Property
Hint to browsers about which properties will animate for better optimisation.
Respect Motion Preferences
Use prefers-reduced-motion media query for accessibility.