我正在尝试使用font-awsome layers和css来达到与下面的图片相同的效果。我可以实现除了梯度之外的所有东西。有没有可能不使用任何额外的图形?

到目前为止我的代码如下:
<script src="https://use.fontawesome.com/releases/v5.8.1/js/all.js"></script>
<span class="fa-layers fa-fw fa-7x">
<i class="far fa-circle progress-circle" ></i>
<i class="far fa-circle progress-circle-small" data-fa-transform="shrink-8" style="color: white;"></i>
<i class="fas fa-sync-alt progress-circle-small" data-fa-transform="shrink-12" style="color: white;"></i>
</span>
发布于 2019-10-14 18:18:38
您可以使用如下所示的伪元素添加它
.custom {
position: relative;
z-index: 0;
}
.custom:before {
content: "";
position: absolute;
z-index: -1;
top: 0;
left: 0;
right: 0;
bottom: 0;
width:1em;
margin:auto;
border-radius: 50%;
background: linear-gradient(to right, blue, red);
transform:scale(0.9);
}<script data-search-pseudo-elements src="https://use.fontawesome.com/releases/v5.8.1/js/all.js"></script>
<span class="fa-layers fa-fw fa-7x custom">
<i class="far fa-circle progress-circle" ></i>
<i class="far fa-circle progress-circle-small" data-fa-transform="shrink-8" style="color: white;"></i>
<i class="fas fa-sync-alt progress-circle-small" data-fa-transform="shrink-12" style="color: white;"></i>
</span>
<span class="fa-layers fa-fw fa-4x custom">
<i class="far fa-circle progress-circle" ></i>
<i class="far fa-circle progress-circle-small" data-fa-transform="shrink-8" style="color: white;"></i>
<i class="fas fa-sync-alt progress-circle-small" data-fa-transform="shrink-12" style="color: white;"></i>
</span>
<span class="fa-layers fa-fw fa-2x custom">
<i class="far fa-circle progress-circle" ></i>
<i class="far fa-circle progress-circle-small" data-fa-transform="shrink-8" style="color: white;"></i>
<i class="fas fa-sync-alt progress-circle-small" data-fa-transform="shrink-12" style="color: white;"></i>
</span>
https://stackoverflow.com/questions/58374383
复制相似问题