DEV Community

Cover image for Animation shorthand property ๐Ÿ˜˜
๐Ÿšฉ Atul Prajapati ๐Ÿ‡ฎ๐Ÿ‡ณ
๐Ÿšฉ Atul Prajapati ๐Ÿ‡ฎ๐Ÿ‡ณ

Posted on โ€ข Edited on

2

Animation shorthand property ๐Ÿ˜˜

Hey lover people, Happy valentines day ๐Ÿ’๐Ÿ’‹

Hope you are enjoyed your day with your partner.

This post is a part of our "20 Days of CSS animation post".

In this dev post we will learn animation shorthand property, So let do it.

First of all play with this codepen.

This is long animation properties

  • animation-name: grow;
  • animation-duration: 1s;
  • animation-timing-function: ease;
  • animation-delay: 1s;
  • animation-iteration-count: 4;
  • animation-direction: alternate;
  • animation-fill-mode: backwards;

And this is the shorthand of our animation properties.

  • animation: grow 1s ease 1s 4 alternate;

But keep in mind we can't write fill mode in shorthand property. we have to write it in a separate line. like this

  • animation-fill-mode: backwards;

That's all for this post And if you are interested to learn CSS you can join E-Learning platform.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay