文章插圖

文章插圖
經歷了 5 個 alpha 版本后 , Bootstrap Icons 已于近日正式發布 v1.0.0 穩定版 。目前該圖標庫已擁有超過 1100 個圖標 , 團隊計劃在即將發布的小版本中再為其增加數百個圖標 。
安裝
通過 npm 安裝:
npm i bootstrap-icons或者從 GitHub 下載新版本 , 或僅下載 SVG 文件(不包含倉庫的其他文件) 。用法
根據自己的設置 , 可以通過多種方式將 Bootstrap Icons 添加到項目:
將 SVG 復制粘貼為內嵌式的 HTML 元素
<svg class="bi bi-chevron-right" width="32" height="32" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M6.646 3.646a.5.5 0 01.708 0l6 6a.5.5 0 010 .708l-6 6a.5.5 0 01-.708-.708L12.293 10 6.646 4.354a.5.5 0 010-.708z"/></svg>通過<img>元素引用<img src="http://www.mnbkw.com/assets/img/bootstrap.svg?x83982" width="32" height="32" title="Bootstrap">使用 SVG sprite<svg class="bi" width="32" height="32" fill="currentColor"><use xlink:/></svg><svg class="bi" width="32" height="32" fill="currentColor"><use xlink:/></svg><svg class="bi" width="32" height="32" fill="currentColor"><use xlink:/></svg>通過 CSS 引入【bootstrap小圖標的類名 bootstrap icon圖標】
.bi::before {display: inline-block;content: "";background-image: url("data:image/svg+xml,<svg viewBox='0 0 16 16' fill='%23333' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z' clip-rule='evenodd'/></svg>");background-repeat: no-repeat;background-size: 1rem 1rem;}
- ps圖層怎么放大縮小快捷鍵 ps縮小圖層的快捷鍵
- bootstrap 日期選擇組件 bootstrap時間控件的用法
- 鼠標的基本操作有哪些? 鼠標的基本操作有哪些視頻
- 阿里巴巴圖標素材 阿里小圖標網站是什么
- 如何恢復電腦桌面快捷方式圖標 恢復桌面圖標的快捷鍵
- 軟件測試鼠標測試點 無線鼠標的測試點
- 制作軟件圖標的手機軟件 圖標制作軟件下載
- 設計圖標的軟件 手機圖標設計免費下載
- bootstrap常用組件 組件bootstrap中文網
- 什么軟件可以轉換坐標系 轉換坐標的軟件
