无法在Safari上完全舍入图像

时间:2017-07-06 18:00:56

标签: css

我无法使用border-radius在Safari上使我的图像完美无瑕。我的代码出了什么问题?

HTML:

<div class="people_photo_wrap">
  <img class="people_photo" src="image.jpg">
</div>

CSS:

.people_photo_wrap {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  overflow: hidden;
}
.people_photo {
  width: 100px;
  height: 100px;
  border: 3px solid transparent;
}

enter image description here

1 个答案:

答案 0 :(得分:1)

将半径添加到图像中。应该做的伎俩。

.people_photo {
  width: 100px;
  height: 100px;
  border: 3px solid transparent;
  border-radius: 50%;
}