【发布时间】:2015-07-13 16:40:20
【问题描述】:
我有一个圆形的背景图像。给它一个黄色边框。我想将边框更改为从黄色到白色的渐变。我见过很多带有方形边框的例子,但没有一个适用于圆形。这是我的代码:
.Profileimage{
background-image: url("images/profilePic.jpg");
background-repeat: no-repeat;
background-size: cover;
overflow:hidden;
-webkit-border-radius:50px;
-moz-border-radius:50px;
border-radius:50%;
width:100px;
height:100px;
border: 5px solid rgb(252,238,33);
}
<div class="Profileimage"></div>
谢谢!!
【问题讨论】:
-
这将使用
border-image属性,该属性不能与border-radius结合使用。 this question 的答案深入探讨了为什么会这样,并提出了一种可以用来欺骗效果的技术。
标签: css linear-gradients