【发布时间】:2015-02-07 10:46:16
【问题描述】:
是否可以仅使用 CSS 边框半径制作这样的形状http://grab.by/Efqk?
这是小提琴:http://jsfiddle.net/9tjgof09/
.avatars {
padding: 50px;
overflow: hidden;
list-style: none;
}
.avatars strong {
display: block;
}
.avatars li {
float: left;
width: 100px;
margin-right: 40px;
}
.avatar {
position: relative;
width: 100px;
height: 100px;
overflow: hidden;
}
.avatars img {
width: 100%;
height: 100%;
vertical-align: top;
}
.avatar-border {
position: absolute;
top: 0;
left: 0;
width: 100px;
height: 100px;
}
.avatar-css img {
border-radius: 25px/25px;
}
【问题讨论】:
-
是的,你试过什么?请提供您尝试的代码。你知道
border-radius有多个值,对吧? MDN Border-radius -
这是我目前拥有的(包括 SVG 代码)jsfiddle.net/9tjgof09
标签: html css svg css-shapes