I have a flask server which hosts a html file for testing. In the head of this html I want to link to a localy stored animate.min.css file (<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='animate.min.css') }}">
).
When I open the page I can look in the insepector and see the linked css file (and I can open it) but the style doesn't work (e.g. <h1 class="animated zoomIn">Index Page</h1>
won't do the animation).
However when I use a file from a CDN (<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
) it works and the effect is be visible.
Why is that? Am I doing something wrong? It's my first time using it so I don't have much experience. Please ask if some information is missing.
Whole code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='animate.min.css') }}">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">-->
<script src="{{ url_for('static', filename='jquery-3.5.1.min.js') }}"></script>
</head>
<body>
<h1 class="animated zoomIn">Index Page</h1>
</body>
</html>
Directory structure:
- Server
- static
- animate.min.css
- jquery-3.5.1.min.js
- templates
- index.html
- server.py
- static
Note:
- The jQuery import is working
- I can access the "animate.min.css"-file under "localhost:5000/static/animate.min.css"
Thanks in advance.