SVG
を使用してパターンブックを作成したいと思っています。かなり楽しい言語のように見えますが、if statement
を使用して別の四角形をすべて入力する方法があるのでしょうか? 1。私が持っているコードは、あなたが見ることができるように、私は仕事をしている表示されている長方形の公平なビットを持っていますが、if statement
を使用する方法があります場合、私は思ったんだけどSVGのIf文を使用
<SVG width="1000" height="1000">
<rect x="10" y="10" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="50" y="100" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="150" y="200" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="240" y="150" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="190" y="30" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="95" y="56" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="19" y="81" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="290" y="190" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="200" y="300" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="189" y="359" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="286" y="389" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="260" y="346" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="20" y="370" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="355" y="410" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="320" y="385" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="61" y="399" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="100" y="450" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="160" y="425" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
<rect x="300" y="400" width="150" height="150" style="fill:white;stroke:black;stroke-width:1;opacity:1"/>
</SVG>
です使いやすくするためです。
[SVGのためのスクリプト](https://www.w3.org/TR/2011/REC-SVG11-20110816/script.html) – Rob
どのようにそれはあなたを助けるでしょうか? –
@Robありがとう、私はそれを今見ている:) –