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>
相關文章
相關標籤/搜索