制作者:@YHX2010 废话少说,上SVG
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<circle cx="50" cy="50" r="50" fill="#ffffff" />
<defs>
<clipPath id="halfLeftCircleClip">
<rect x="25" y="50" width="25" height="50.5" />
</clipPath>
<!-- right half circle clip -->
<clipPath id="halfRightCircleClip">
<rect x="50" y="0" width="25" height="50.5" />
</clipPath>
<!-- left half circle clip -->
<!-- 一半的裁切 -->
<mask id="aHalfCircle">
<circle cx="50" cy="50" r="50" fill="white" />
<rect x="50" y="0" width="50" height="100" fill="black" />
<circle cx="50" cy="25" r="25" fill="white" />
<circle cx="50" cy="75" r="25" fill="black" />
</mask>
<mask id="rightHalfStarMask">
<rect x="50" y="0" width="50" height="100" fill="white"/>
<!-- 右上角 -->
<circle cx="100" cy="0" r="50" fill="black"/>
<!-- 裁掉上面 -->
<circle cx="50" cy="25" r="25" fill="black" />
<!-- 取回下面一个圆 -->
<circle cx="50" cy="75" r="25" fill="white" />
<!-- 右下角 -->
<circle cx="100" cy="100" r="50" fill="black"/>
<!-- 左下角 -->
<circle cx="0" cy="100" r="50" fill="black"/>
</mask>
<mask id="leftHalfStarMask">
<!-- 总的矩形 -->
<rect x="0" y="0" width="50" height="100" fill="white"/>
<!-- 保留上方一个圆 -->
<circle cx="50" cy="25" r="25" fill="white" />
<!-- 左上角 -->
<circle cx="0" cy="0" r="50" fill="black"/>
<!-- 裁掉下面 -->
<circle cx="50" cy="75" r="25" fill="black" />
<!-- 左下角 -->
<circle cx="0" cy="100" r="50" fill="black"/>
<!-- 右上角 -->
<circle cx="100" cy="0" r="50" fill="black"/>
</mask>
<linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="rgb(240, 203, 53)"/>
<stop offset="100%" stop-color="rgb(37, 36, 252)"/>
</linearGradient>
</defs>
<rect x="0" y="0" width="100" height="100" fill="url(#gradient)" mask="url(#rightHalfStarMask)" />
<circle cx="50" cy="75" r="25" fill="none" clip-path="url(#halfLeftCircleClip)" />
<circle cx="50" cy="25" r="25" fill="none" clip-path="url(#halfRightCircleClip)" />
<!-- 四角星 -->
<circle cx="0" cy="0" r="50" fill="none" />
<circle cx="100" cy="0" r="50" fill="none" />
<circle cx="0" cy="100" r="50" fill="none" />
<circle cx="100" cy="100" r="50" fill="none" />
<!-- 左边 -->
<circle cx="50" cy="50" r="50" mask="url(#aHalfCircle)" fill="#1f1f1f" />
<circle cx="50" cy="50" r="50" mask="url(#leftHalfStarMask)" fill="white" />
</svg>
Preview:
插不进来 ![]()
(上传出错)

