That is because you are registering/enqueing it as a script. You can add CSS in the wp_enqueue_scripts
action but they should be added with the wp_enqueue_style
function (and wp_register_style
if you register and enqueue seperately)
E.g.
function My_adds_to_the_footer(){
wp_register_style('add-animation-css', get_stylesheet_directory_uri(). '/animation.css');
wp_enqueue_style('add-animation-css');
}
add_action('wp_enqueue_scripts', 'My_adds_to_the_footer');