CSS @starting-style - Interactive CSS Lab | IconVault
Learn CSS @starting-style: animate elements in from display:none with pure CSS. Compare techniques live, copy the working recipe.
CSS @starting-style
Animate elements in from display:none
Technique
Entry effect
5 of 5 free uses left. Toggling and previews are unlimited.
Live demo
Entry-animated card
Both halves animate: it glides in and glides out.
.card {
transition: opacity 400ms ease, transform 400ms ease, display 400ms;
transition-behavior: allow-discrete;
}
@starting-style {
.card {
opacity: 0;
transform: translateY(16px);
}
}The rule to remember
- Entry from
display: noneneedstransition-behavior: allow-discreteand@starting-style. One without the other does nothing useful. - With
allow-discrete, discrete properties likedisplayflip at the 50% mark of the transition. - Same recipe powers animated
popoveranddialogopen/close, and pairs withinterpolate-size: allow-keywordsfor height auto animations.
About this tool
IconVault's CSS @starting-style lab teaches the pure-CSS way to animate elements in from display: none. Three techniques run side by side on the same card: @starting-style alone, transition-behavior: allow-discrete alone, and both combined. You will feel the classic gotcha firsthand: @starting-style alone does nothing, allow-discrete alone animates only the exit, and only the pair gives you a smooth entry and exit.
Pick a fade, slide or scale effect, dial the duration, and copy the generated CSS. It is free and runs fully in your browser, and @starting-style is Baseline new (Chrome 117+, Safari 17.5+, Firefox 129+). The same recipe animates popovers and dialogs open and closed without a line of JavaScript.
Frequently asked questions
Popular searches
More tools
Algorithm Visualizer
Watch sorting and searching animate step by step
Alt Text Helper
Write better image alt text with live feedback
ARIA Reference
Searchable ARIA roles and attributes guide
Array Visualizer
Step through map, filter, reduce like a debugger
Coming soon
CLI
Coming soon
Figma plugin
Coming soon
VS Code extension
Coming soon
Chrome extension
Coming soon
AI icon generator
Coming soon
Team workspaces
Coming soon