Solved issue with CSS animation in firefox.