【问题标题】:The rounded corners of the images inside a card don't look right卡片内图像的圆角看起来不正确
【发布时间】:2022-11-24 07:54:33
【问题描述】:

我有多张卡片,里面有图片。我希望图像有圆角。代码有点工作,但圆角看起来不正确。

Current result

对于图像,我只使用 Bootstrap 类 rounded。图像按比例缩小但没有失真。这是卡片的 CSS:

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #F5F5F5;
  background-clip: border-box;
  border: 0.0625rem solid #E5E7EB;
  border-radius: 1rem; }

对可能发生的事情有任何想法吗?如果需要更多信息,请告诉我。

【问题讨论】:

    标签: css image twitter-bootstrap rounded-corners card


    【解决方案1】:

    尝试做

    border-radius: 25px;

    有时 rem 不适用于边界半径

    【讨论】:

      猜你喜欢
      • 2021-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-18
      • 2016-03-30
      • 2012-12-02
      相关资源
      最近更新 更多