似乎无法访问 animate.css [英] Can't seem to get to animate.css

查看:150
本文介绍了似乎无法访问 animate.css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我做到了

npm install animate.css --save

安装成功后,我可以在我的node_modules中看到它我希望能够在我的 elixir-phoenix-react 项目中使用 animate.css.

Which installed it successfully, I can see it in my node_modules I want to be able to use animate.css in my elixir-phoenix-react project.

我只是不确定在哪里导入/需要它以及路径是什么.

I am just unsure where to import/require it and what the path would even be.

我试图从我的 app.scss 文件中 @import "animate.css"; 但那没有用

I tried to @import "animate.css"; from my app.scss file but that did not work

我也尝试在我的 app.js 文件中 import "animate.css/animate.min.css"; 也没有工作.

I also tried to import "animate.css/animate.min.css"; in my app.js file that also did not work.

我的问题是我在哪里导入/需要 animate.css 以便它工作?我想在我的 React 组件中使用它来添加一些动画.

My question is where do I import/require animate.css so that it works? I want to use it in my react components to add some animation.

推荐答案

我按照下面的方式安装animate.css之后

After I installed animate.css in the way below

npm install animate.css --save

我不得不从我的 node_modules 中导入这样的 css 文件:

I simple had to import the css file like this from my node_modules:

@import "~animate.css/animate.css";

干杯

这篇关于似乎无法访问 animate.css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆