0
svgを使用してサンプルの株価チャートを作成していますが、rect要素をline要素の上に置くことができません。私が読んだことはすべて、SVGに最初に追加するだけでいいということです。しかし、そのトリックをやっていません。SVG:rectは常に行の後ろにあります
rectを行の上に表示するにはどうすればよいですか?ここで
が表示されていただきましたです:ロバートLongsonさんのコメントが正しい
<svg height="110" width="105">
<rect width="5" height="28" x="7.5" y="22" style="stroke:black; stroke-width:1; fill:red"></rect>
<rect width="5" height="12" x="27.5" y="49.5" style="stroke:black; stroke-width:1; fill:red"></rect>
<rect width="5" height="39" x="47.5" y="22" style="stroke:black; stroke-width:1; fill:white"></rect>
<rect width="5" height="7" x="67.5" y="22" style="stroke:black; stroke-width:1; fill:red"></rect>
<line x1="0" y1="35.6666666666667" x2="20" y2="30" style="stroke:limegreen; stroke-width:4"></line>
<line x1="0" y1="22" x2="20" y2="49.5" style="stroke:red; stroke-width:4"></line>
<line x1="20" y1="30" x2="40" y2="35.3333333333333" style="stroke:limegreen; stroke-width:4"></line>
<line x1="20" y1="49.5" x2="40" y2="61" style="stroke:red; stroke-width:4"></line>
<line x1="40" y1="35.3333333333333" x2="60" y2="41.6666666666667" style="stroke:limegreen; stroke-width:4"></line>
<line x1="40" y1="61" x2="60" y2="22" style="stroke:red; stroke-width:4"></line>
<line x1="60" y1="41.6666666666667" x2="80" y2="46.6666666666667" style="stroke:limegreen; stroke-width:4"></line>
<line x1="60" y1="22" x2="80" y2="29" style="stroke:red; stroke-width:4"></line>
</svg>
トップのものにする最後にする必要があります。ペインターのモデル:最後にペイントするものが上にあります。 –