WebPack引用Bootstrap 没法使用图标的结局方案

npm i https://github.com/iconic/open-iconic.git -D  由于boostrap的css里删除了图标 分开了 咱们在引入个呵呵。css

下载:npm i bootstrap@4.1.3 -D
因为4.x版本icon文件分离出去因此还须要下载open-iconic:html

npm i https://github.com/iconic/open-iconic.git -D(下载可能有点慢,要花个几分钟,可用cnpm下载)

在index.js中引入webpack

import 'bootstrap/dist/css/bootstrap.css'
import 'open-iconic/font/css/open-iconic-bootstrap.css'

在webpack.config.js中配置
在html中引用git

<span class="oi oi-account-login"></span>
<span class="oi oi-account-logout"></span>
相关文章
相关标签/搜索