
Animating Transform and Opacity Only
I was staring at a client’s site last Tuesday—one of those “modern” builds that felt like it was held together by sheer willpower and too many plugins—and watching a hero section fade in felt like watching a slow-motion car crash. Everyone thinks you need heavy, high-fidelity JavaScript libraries to make a site feel “premium,” but they’re usually just burying the lead under a mountain of bloat. If you’re looking for a magic plugin to fix your performance, you’re doing it wrong; learning how to optimise animations isn’t about adding more flair, it’s about subtracting the weight that kills your Core Web Vitals.
I’m not here to sell you on some flashy new motion library or a subscription to a “speed booster” that just adds more junk to your header. I’ve spent nine years un-building the messes other people leave behind, and I’ve learned that the best motion is the kind you don’t feel. In this post, I’m going to show you how to use CSS where it actually matters and why you should be terrified of animating properties that trigger layout shifts. No hype, just the actual technical decisions you need to make to keep your site fast.
Table of Contents
Optimizing the Render Pipeline Before You Write Code

Before you even touch a line of CSS or start dragging elements around in a builder, you need to look at the foundation. I’ve spent enough time fixing broken, stuttering sites to know that most people try to fix motion problems with more code, when they should be looking at the architecture. If your base setup is heavy, you aren’t just adding an animation; you’re adding weight to a sinking ship. Optimizing the render pipeline starts with understanding what the browser is actually doing when it tries to draw your site.
If you aren’t careful, you’ll end up fighting the browser’s own engine. I see it constantly: developers trying to animate properties like `width` or `top`, which forces the browser to recalculate the entire layout every single frame. That is a recipe for disaster. Instead, you want to focus on properties that allow for CSS hardware acceleration. By sticking to `transform` and `opacity`, you’re essentially handing the heavy lifting over to the GPU. This isn’t just a technicality; it’s the difference between a site that feels fluid and one that suffers from constant, nauseating layout shifts. Don’t build on top of a mess and expect the motion to save you.
Minimizing Layout Shifts to Respect the Existing Structure

There is nothing that irritates me more than a site that feels like it’s constantly rearranging its own furniture while I’m trying to read it. We’ve all been there: you’re halfway through a sentence when a massive hero image finally decides to load, shoving the entire text block down the page. That’s not “dynamic design”; it’s a failure of planning. When I’m auditing a site, my first priority is minimizing layout shifts by ensuring elements have reserved space before they even appear. If you aren’t defining aspect ratios or setting explicit dimensions for your media, you’re basically inviting the browser to play a chaotic game of Tetris with your user’s viewport.
I’ve inherited enough bloated page builder sites to know that these shifts usually happen because someone prioritized a “fancy” entrance animation over basic stability. If an element slides into place by pushing other content around, you’ve already lost the battle for a professional feel. Instead of manipulating properties like `top` or `margin`—which force the browser to recalculate the entire page layout—I stick to `transform`. By leveraging CSS hardware acceleration, you keep the heavy lifting on the GPU, allowing the animation to glide over the existing structure rather than fighting against it. It’s about working with the architecture, not breaking it.
Stop making the browser do your chores
- Stick to the holy trinity of transform, opacity, and filter. If you’re trying to animate height, width, or top/left, you’re forcing the browser to recalculate the entire layout every single frame, and I simply don’t have the patience for that kind of inefficiency.
- Use `will-change` sparingly, like a potent spice. It’s tempting to slap it on every moving div to “help” the browser, but if you overdo it, you’re just eating up GPU memory for no reason. Tell the browser what’s coming, but don’t treat it like a magic wand.
- Kill the heavy lifting with hardware acceleration. I want those animations running on the GPU, not choking the main thread. If your transitions feel sluggish, it’s usually because you’re asking the CPU to do work it was never meant to handle.
- Watch your easing curves. A “natural” feeling animation shouldn’t mean a complex, computationally expensive math equation. Keep your cubic-beziers sensible; if the math is too heavy, the frame rate will pay the price.
- Audit your scroll-triggered chaos. There is nothing I hate more than a site that triggers twenty different entrance animations the second a user moves their mouse. Use Intersection Observer to ensure things only animate when they’re actually in view, rather than loading a mountain of unnecessary work in the background.
Stop treating motion like an afterthought

At the end of the day, optimizing animations isn’t about adding fancy bells and whistles to a site; it’s about making sure those bells don’t crash the entire engine. We’ve talked about respecting the render pipeline and, more importantly, keeping your layout from jumping around like a caffeinated toddler every time a new element slides in. If you aren’t mindful of the underlying architecture before you start layering on transitions, you aren’t designing—you’re just adding technical debt. I’ve spent way too many hours un-doing the damage caused by developers who thought “smooth” meant “heavy,” and I’m telling you now: performance is a prerequisite for aesthetics, not a luxury you add once the site is finished.
My advice? Stop looking for the “perfect” animation plugin and start looking at the decisions you’re actually making with your CSS. A well-placed, lightweight transition does more for a user’s experience than a massive, bloated JavaScript library ever will. When you treat motion as a deliberate structural choice rather than a decorative layer, you build sites that actually last. Don’t just make things move; make them move with purpose, and for heaven’s sake, make sure they don’t break the site in the process.