Reputation: 66
I have some .svg images and I want to use then as icon in my webpage. Is there any way to do this with the <i>
tag?
Upvotes: 1
Views: 5440
Reputation: 66
I've solved my problem adding the svg code of the image directly on my html.
Something like this:
<svg class="bi bi-x-circle" fill="#ec5e45" height="16"
viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
<path
d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path
d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
</svg>
Upvotes: 1