【发布时间】:2022-01-12 15:49:41
【问题描述】:
我正在尝试使以下图像看起来不错。
基本上我想隐藏垂直笔划与<path/>的另一部分重叠的地方
我在下面做了一个简化的 sn-p 供人们玩。
path {
transform: translate(50px, 50px);
stroke-width: 1;
stroke: black;
opacity: .5;
box-sizing: inherit;
stroke-linecap: round;
stroke-linejoin: miter;
}
<svg height="400px" width="400px">
<path stroke-width="1" stroke="black" fill="green" d="
M 0,0
L -5,0
L -5,-5
L -22,-5
L -22,-20
L 22,-20
L 22,-5
L 5,-5
L 5,0
L 50,0
L 50,-25
L -22,-25
L -22,-40
L 132,-40
L 132,-25
L 60,-25
L 60,0
L 94,0
L 94,-5
L 33,-5
L 33,-20
L 165,-20
L 165,-5
L 104,-5
L 104,0
L 152.5,0
Q 155.5,8 152.5,16
L 0,16
z"></path>
</svg>
谢谢!
【问题讨论】:
-
有什么原因不能让路径填充纯色(而不是半透明)?
-
抱歉,没有真正的理由。