css - npm 安装后如何引用 Google Material-Design-Icons?

标签 css reactjs npm material-design material-ui

那么在完成 npm install material-design-icons 之后,我该如何在我的 React 应用程序中使用它们?

包含的方法 here不包括 npm 方法。

最佳答案

这是您可以引用它的方式(在您的 styles.css 中):

@import '~material-design-icons/iconfont/material-icons.css';

使用方法:

<i class="material-icons">cloud_upload</i>

关于css - npm 安装后如何引用 Google Material-Design-Icons?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50692153/

相关文章:

CSS3 变换属性在 Internet Explorer 中的工作方式不同

reactjs - 运行 Jest 时,Babel 不会编译 .test.js 文件

github - 如何找到跨 github 存储库使用的 npm 模块版本?

node.js - npm 安装后 npm 缺少软件包

express - NPM 安装快速。错误 : No compatible version found

html - ng-hide 无法正常工作

css - FooterWrap 打破盒子

jquery - 如何在不更改动态(用户)生成图像的 img 标签或 HTML 的情况下延迟加载图像

reactjs - 图像仅在延迟 1 秒然后 setState 时渲染

javascript - React JS 选择菜单默认值