@keyframes rules

Hello there, can somebody explain to me what will happen when there’s only 50% property included inside @keyframes?

Below is the link to the challenge. Why is 0% and 100% not include yet still it moves to and fro?

Link to the challenge:

Hi, Mabel. It should perform the animation and show the change halfway through the animation and then return to whatever the element’s initial state was.

0% and 100% are not included because there is no change being requested at the beginning or ending of the animation. Or I should say, no change that is different from the element’s starting state. It just starts from it’s default and returns to its default.

Someone can correct me if I’m wrong, but that’s what my observation and intuition tell me from doing those challenges last night.

Hi @fluffer ,

I agree with @lepros, 0% and 100% are not included because it takes it by default. No matter what percentage you give between 0% and 100%. It moves to and fro. By giving opacity, it makes the ball fade when it moves to the left.

I hope this helps.

Hi @lepros & @nivethakrishnan72, okay that makes sense. Thanks for the explanation!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.