css实现左上角缺口的圆环?

新手上路,请多包涵

实现带缺口的圆环
image.png

阅读 2.7k
1 个回答
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      width: 200px;
      height: 200px;
      background:
        radial-gradient(closest-side circle, royalblue 99%, transparent 100%) center top/25% 25% no-repeat,
        conic-gradient(transparent 10%, royalblue 90%);
      -webkit-mask: radial-gradient(closest-side circle, transparent 50%, red 51% 99%, transparent 100%);
    }
  </style>
</head>

<body>
  <div></div>
</body>

</html>

image.png
更多参看:

https://segmentfault.com/a/1190000043622887
推荐问题
宣传栏