Bootstrap

2023-05-05  本文已影响0人  Yanl__

Bootstrap v4 图标库引用

1.首先下载bootstrap-icons-1.10.5.zip

2.在页面中引入

//2.在页面中引入
<link rel="stylesheet" href="{% static '/bootstrap-icons-1.10.5/font/bootstrap-icons.css' %}">

3.推荐使用

<i class="bi-alarm-clock"></i>
这样可以使用 font-size 和 color 样式属性可以更改图标的外观。

<button type="button" class="btn btn-primary">
  <i class="bi bi-star" style="font-size: 2rem; color: whitesmoke;"></i>
  <span style="font-size: 2rem; color: whitesmoke;">Button</span>
 </button>
上一篇 下一篇

猜你喜欢

热点阅读