带有实心边框的 CSS 插入边框半径

ali*_*ali 0 html css insets css-shapes

我知道我可以使用径向渐变创建插入/倒置边框,就像这里:Inset border-radius with CSS3,但我想知道的是我是否可以在结果形状周围绘制 1px 的实心边框,就像这样图片:
在此处输入图片说明

我不仅希望左下角半径也被边框反转,并且剩余空间内的背景颜色必须是透明的。是否可以使用 CSS3 和 HTML(我现在对画布或 SVG 不感兴趣)?

Gil*_*mbo 5

演示: Jsfiddle在这里

代码

figure {
  position: relative;
  width: 200px;
  height: 120px;
  margin: 100px auto;
  overflow: hidden;
  border: 1px solid black;
  border-right: none;
  border-bottom: none;
  border-bottom-left-radius: 5px;
  border-top-left-radius: 5px;
}

figure:before,
figure:after {
  content: '';
  position: absolute;
}

figure:before {
  right: -50%;
  top: 0;
  background: transparent;
  width: 172px;
  height: 200px;
  border: 1px solid black;
  border-radius: 100%;
  box-shadow: 0 0 0 100em red;
}

figure:after {
  left: -1px;
  bottom: 0px;
  height: 16px;
  width: 128px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 5px;
  border-left: 1px solid black;
  border-bottom: 1px solid black;
}
Run Code Online (Sandbox Code Playgroud)
<figure></figure>
Run Code Online (Sandbox Code Playgroud)