Bootstrap 4 img-circle 类似乎不存在 [英] Bootstrap 4 img-circle class doesn't seem to exist

查看:31
本文介绍了Bootstrap 4 img-circle 类似乎不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用 HTML5 和 Bootstrap 4 编写一个网站,我正在尝试将一个方形图像变成一个圆形.在 Bootstrap 3 中,使用 .img-circle 很容易做到这一点,但现在我似乎无法让它工作,而且我在网上找不到任何答案.Bootstrap 是否删除了 img-circle 类,还是我的代码搞砸了?

事情是这样的:

<div class="col-xs-7"><img src=img/gallery2.JPG";class="img-circle";alt=帮助图片">

希望有人能帮助我:)

解决方案

现在称为 rounded-circle 作为

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 now I can't seem to get it to work and I can't find any answers online. Has Bootstrap dropped the img-circle class or is my code messed up?

It goes something like this:

<!-- Within a tab-content div --> 
<div class="col-xs-7">
    <img src="img/gallery2.JPG" class="img-circle" alt="HelPic">
</div>

Hope somebody can help me out :)

解决方案

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

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

Demo

这篇关于Bootstrap 4 img-circle 类似乎不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆