Is it possible to resize a bootstrap icon in CSS? The icons are SVG. I am adding the icon in HTML, not via CSS.
Asked
Active
Viewed 8,215 times
1
-
1You have added the SVG inline code of the icon to HTML? – Alexandr_TT Feb 20 '21 at 17:12
3 Answers
5
Changing the font-size solve it for me:
<i class='bi bi-search' style='font-size:26px;'></i>

mvoelcker
- 330
- 4
- 8
1
You can create your own css class:
svg.bi.bi-icon-sm {
height: 8px !important;
width: 8px !important;
}
...
svg.bi.bi-icon-xl {
height: 32px !important;
width: 32px !important;
}

JOPimentel
- 139
- 1
- 11
1
It is possible to use the bootstrap predefined font sizes https://getbootstrap.com/docs/5.2/utilities/text/#font-size
E.g.:
<span class="bi bi-box-arrow-right fs-3"></span>

appsofteng
- 152
- 5