C
C
copal2016-01-24 22:51:00
css
copal, 2016-01-24 22:51:00

How to create non-smooth animation?

There is a square that needs to be animated for 4s.
1s is visible
2s is not visible
3s is visible
4s is not visible
At the same time, do not have smooth transitions between states. How to do this? Is there any special property?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Kravchenko, 2016-01-24
@copal

animation steps
codepen.io/imdmitrykravchenko/pen/OMQrZW

S
Sanan Yuzb, 2016-01-24
@Sanan07

@keyframes myAnimation {
                      0% {
                        opacity: 1;
                      }
                      25% {
                        opacity: 0;
                      }
                      50% {
                        opacity: 1;
                      }
                      75% {
                        opacity: 0;
                      }
                      100% {
                        opacity: 1;
                      }
                    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question