1

I cannot, for the life of me, get Bootstrap icons 1.11.3 to display at all. I am using a Blazor SSR project. I have this link setup in App.razor:

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

I have tried numerous approaches to getting the bi-alarm image to display. I have even downloaded the alarm.svg file and placed it into my “images” folder. Even using <img src="~/images/alarm.svg" />, the image will not display.

What could I be doing wrong?

1 Answer 1

1

To use picture in wwwroot folder, delete the "~" symbol will work. Try following:

@page "/"
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<h1>Hello, world!</h1>
<img src="/favicon.png"/>
<span class="bi-alarm"></span>

Test result:

enter image description here enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.