gpt4 book ai didi

html - 如何使 Bootstrap 图像变圆?

转载 作者:行者123 更新时间:2023-12-04 16:40:32 27 4
gpt4 key购买 nike

我似乎无法使用以下方法将我的图像放在一个完美的圆圈中:

.rounded {
border-radius: 50px!important;
}

我应该使用其他 CSS 设置吗?图片的顶部和底部仍然有一条水平线,即使我抬高超过 50px。

enter image description here

enter image description here

最佳答案

如果您使用 Bootstrap ,只需使用类 .rounded-circle

<img src="img.jpg" class="rounded-circle" alt="img">

你也可以使用这个css属性

  width: 50%;
height: 50%;
border-radius: 50%;

关于html - 如何使 Bootstrap 图像变圆?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61808278/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com