Bootstrap 4 img-circle class not working

前端 未结 3 1664
遇见更好的自我
遇见更好的自我 2021-01-30 08:09

I\'m writing a website in HTML5 and Bootstrap 4 and I\'m trying to turn a square image into a circle. In Bootstrap 3 this was easily do-able with .img-circle, but n

相关标签:
3条回答
  • 2021-01-30 08:39

    In Bootstrap 4 it was renamed to .rounded-circle

    Usage :

    <div class="col-xs-7">
        <img src="img/gallery2.JPG" class="rounded-circle" alt="HelPic>
    </div>
    

    See migration docs from bootstrap.

    0 讨论(0)
  • 2021-01-30 08:42

    It's now called rounded-circle as explained here in the BS4 docs

    <img src="img/gallery2.JPG" class="rounded-circle">
    

    Demo

    0 讨论(0)
  • 2021-01-30 08:53

    Now the class is this

     <img src="img/img5.jpg" width="200px" class="rounded-circle float-right">

    0 讨论(0)
提交回复
热议问题