CSS: @starting-style a new & cool at-rule
Dec 23, 2024 pm 05:16 PMThe @starting-style CSS at-rule is used to define starting values for properties set on an element that you want to transition from when the element receives its first style update, i.e. when an element is first displayed on a previously loaded page.
Let's take a toast message as an example. To display it to the user, we will change its visibility, but the result will be that it appears immediately. Now we can use the new @starting-style rule to define the starting animation for this element.
Some simple examples
Let's use this baseline HTML, a simple rectangle:
1 2 3 4 5 |
|
Add initial background-color transition from blue to pink
1 2 3 4 5 6 7 8 9 10 |
|
Add rotation to the previous example
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Anyways, you get the idea.
Animate your popups, and menus or create an animated logo,
It's straightforward.
NOTE
This feature currently has limited availability.
The above is the detailed content of CSS: @starting-style a new & cool at-rule. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Adding Box Shadows to WordPress Blocks and Elements

Create a JavaScript Contact Form With the Smart Forms Framework

Create an Inline Text Editor With the contentEditable Attribute

Making Your First Custom Svelte Transition

File Upload With Multer in Node.js and Express

Comparing the 5 Best PHP Form Builders (And 3 Free Scripts)

Best CSS Animations and Effects on CodeCanyon 2025 (Paid Free)
