← Back to functions
CSS Function
scale()
TransformScales an element larger or smaller around its transform origin.
Syntax
scale(x, y)
Example
transform: scale(1.05);
Common use cases
- Hover zoom effects on cards
- Press animations on buttons
- Entrance animations
Practical developer insight
Use will-change sparingly on heavily animated elements — overusing it can hurt performance. Prefer GPU-friendly properties like transform and opacity for smooth animations.