第一种使用相对绝对 div 的方法 https://jsfiddle.net/2Lzo9vfc/67/
HTML
<div class="big-circle">
<div class="small-circle">
<div class="extra-small-circle">
</div>
</div>
</div>
CSS
.big-circle {
position: relative;
width: 200px;
height: 200px;
border-radius: 50%;
background: black;
}
.small-circle {
background: red;
width: 100px;
height: 100px;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50px, -50px);
}
.extra-small-circle {
background: white;
width: 50px;
height: 50px;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-25px, -25px);
}
使用渐变的第二种方式 https://jsfiddle.net/2Lzo9vfc/69/
HTML
<div class="circle"></div>
CSS
.circle {
width: 200px;
height: 200px;
border-radius: 50%;
background: #ffffff; /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover, #ffffff 17%, #ff0a0a 19%, #ff2828 40%, #000000 41%); /* FF3.6-15 */
background: -webkit-radial-gradient(center, ellipse cover, #ffffff 17%,#ff0a0a 19%,#ff2828 40%,#000000 41%); /* Chrome10-25,Safari5.1-6 */
background: radial-gradient(ellipse at center, #ffffff 17%,#ff0a0a 19%,#ff2828 40%,#000000 41%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
}