border添加渐变色,IOS上圆形是不支持的,可以通过设置padding之后添加背景色渐变实现
<img class="box" src="./default/face.png" />
.box {
display: block;
width: 100px;
height: 100px;
border-radius: 50%;
box-sizing: border-box;
padding: 5px;
background-image: -webkit-linear-gradient(
top,
red 0%,
blue 30%,
yellow 60%,
green 90%
);
background-image: -moz-linear-gradient(
top,
red 0%,
blue 30%,
yellow 60%,
green 90%
);
background-image: linear-gradient(
top,
red 0%,
blue 30%,
yellow 60%,
green 90%
);
}