-1

在 Flask 中滚动时,我将如何进行显示动画(例如 WOW.js)?是否可以在 python 中优雅地使用 javascript 库,或者我必须简单地将所有内容移植到烧瓶中?

4

2 回答 2

2

Flask 是一个服务器端的 Web 框架。它将处理浏览器的请求并输出响应。如果正确输出,您的客户端代码将正常工作。

您将需要使用Jinja2模板呈现 HTML。您可以将 JS 文件、CSS 文件和图像作为静态内容提供。如果它们提供正确并且浏览器可以加载它们,那么一切都会正常工作。

于 2016-01-03T14:25:11.417 回答
0

To complete Abu Ashraf Masnun's answer, I'd use Bower to manage the dependencies of your different js packages.

I use it with Jinja2 and Flask together and it's running very good (it can be a bit mindfuck with Angular (because Jinja2 and Angular are using the same syntax for placeholders) but it doesn't seem to be important for you :) ).

于 2016-01-03T14:52:56.123 回答