Can I implement a bootstrap icon with circular background area in Bootstrap 5?
Currently I produced this ellipse. I want to implement it circularly
.green{
background-color:green;
}
.i1{
border-radius:50%
}
.i2{
border-radius:9px 9px;
}
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"/>
<i class="i1 bi bi-check-circle green"></i>
<i class="i2 bi bi-check-circle green"></i>
Thanks in advance
2
Answers
.rounded-circle
bootstrap you’re looking for.Actually that
<i>
tag is coming that way only. You can try<span class="rounded-circle"><i class="bi bi-check-circle green rounded-circle"></i></span>
still that will come that way.I have added a new div with background red and it is circular. The container element should be of
block
property to make it rounded.surround each icon inside a parent div. I do this by using ul li and giving it a border radius that is sufficient for the height, border color, etc.
Please refer my code ther i commented every
details i done