M
M
make_dev2018-03-29 16:52:09
css
make_dev, 2018-03-29 16:52:09

Sequential animation delay in Sass for child elements?

Hello! How to use sass to create a more elegant solution for sequentially animating child elements from this?

.myClass img:nth-child(1){
    -webkit-animation: myAnimation 0.9s linear forwards;
}
.myClass img:nth-child(2){
    -webkit-animation: myAnimation 0.9s linear 0.1s forwards;
}
.myClass img:nth-child(3){
    -webkit-animation: myAnimation 0.9s linear 0.2s forwards;
}
.myClass img:nth-child(4){
    -webkit-animation: myAnimation 0.9s linear 0.3s forwards;
}
.myClass img:nth-child(5){
    -webkit-animation: myAnimation 0.9s linear 0.4s forwards;
}

Here, so that, as in the ZOE example, icons of social networks are consistently shown.
ZOE Example

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Froggyweb, 2018-03-29
@Froggyweb

It's better to control the delay than the duration of the animation. In sass, you can make a mixin with a cycle
. Therefore, in the code, only the firefox webkit and does not animate anything

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question