Why animate.css animation is played only once?

做~自己de王妃 提交于 2019-12-24 22:19:57

问题


I am checking the navigator onLine property changes. To achieve this, we are listening to the HTML5 online/offline window events, so when we are in the offline mode, I play a flipInX animation, and the same thing when connection comes back I play a flipInY animation, in this case it works properly :

#yh-app.yh-online & {
    @include animation(flipInX 1s);
}

#yh-app.yh-offline & {
    @include animation(flipInY 1s);
}

The problem comes when i try to play the same animation for both (offline and online modes) for example flipInX for both:

#yh-app.yh-online & {
    @include animation(flipInX 1s);
}

#yh-app.yh-offline & {
    @include animation(flipInX 1s);
}

In this case the animation is played only once !!! Does anyone have solution, Please? Thanks :)

来源:https://stackoverflow.com/questions/47410458/why-animate-css-animation-is-played-only-once

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!