我正在嘗試制作這樣的形狀

我設法做到了這一點

但我無法獲得正確的弧線向外而不是向內。我在網上找不到任何幫助如何做到這一點。我嘗試旋轉并使用 rx,但沒有運氣。
這是它的 JSFiddle
提琴手
<svg height="200" width="300">
<g stroke="none" fill="blue">
<path d="
M 150 0
a 1 1 0 0 0 0 100
l -100 0
a 1 1 0 0 0 0 -100
l 100 0
Z
"/>
</g>
</svg>
uj5u.com熱心網友回復:
在第一個弧上,您只需sweep-flag將“順時針”翻轉:https :
//developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#elliptical_arc_curve
<svg height="200" width="300">
<g stroke="none" fill="blue">
<path d="
M 150 0
a 1 1 0 0 1 0 100
l -100 0
a 1 1 0 0 0 0 -100
l 100 0
Z
"/>
</g>
</svg>
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/312328.html
標籤:javascript svg
上一篇:png或svg影像的顫動波紋效果
