如何在本地安装带有奖励插件的 GSAP?

发布于 2025-01-17 11:33:48 字数 289 浏览 0 评论 0原文

我已经完成了安装步骤。我尝试了各种方法,但无法在HTML文件中运行它。即使我在“ node_modules”部分中抛出“ GSAP”文件,并使用< script>标签,它不起作用。

这就是我在html文件中称为“ all.js”的方式。也尝试了所有其他方法。

<script src="src/all.js"></script>
<script src="app.js"></script>

我想在我的项目中使用本地所有插件。

I have done the installation steps. I tried every way but I can't run it in HTML file. Even if I throw the "gsap" file in the "node_modules" section and call it with the <script> tag, it doesn't work.

This is how I call "all.js" in HTML file. Tried all other ways too.

<script src="src/all.js"></script>
<script src="app.js"></script>

I want to use all plugins locally in my project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ゝ杯具 2025-01-24 11:33:48
<html>
  <body>
    <h1>Some content</h1>
    <script src="path-to-my-scripts/gsap.min.js"></script>
    <script src="path-to-my-scripts/ScrollTrigger.min.js"></script>
    <script src="app.js"></script>
  </body>
</html>

好吧,我解决了。需要编写“min.js”文件,而不是直接编写“all.js”文件。

<html>
  <body>
    <h1>Some content</h1>
    <script src="path-to-my-scripts/gsap.min.js"></script>
    <script src="path-to-my-scripts/ScrollTrigger.min.js"></script>
    <script src="app.js"></script>
  </body>
</html>

Okay, I solved it. It is necessary to write the "min.js" files, not the "all.js" file directly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文