How to use Bootstrap icon?

2.7k Views Asked by At

<link rel="stylesheet" href="css/bootstrap-icons.css">

My HTML

<a href="index.php" class="btn btn-outline-dark col-1"><i class="bi bi-alarm-fill"></i></a>

I want to use Bootstrap icon inside <a> tag. In response getting [] (square).

2

There are 2 best solutions below

1
On

Add this to your html file:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">

then you can use icons like this:

<i class="bi bi-search"></i>
0
On

Solved

Everything was OK. Just need to change path in bootstrap-icons.css

@font-face {
  font-family: "bootstrap-icons";
  src: url("bootstrap-icons.woff2?856008caa5eb66df68595e734e59580d") format("woff2"),
url("bootstrap-icons.woff?856008caa5eb66df68595e734e59580d") format("woff");
}