SVG <polygon>
<polygon> ਟੈਗ ਤਿੰਨ ਤੋਂ ਜ਼ਿਆਦਾ ਪਾਰਟੀਆਂ ਵਾਲੇ ਗਰਾਫਿਕਸ ਬਣਾਉਣ ਲਈ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ。
<polygon> ਟੈਗ
<polygon> ਟੈਗ ਤਿੰਨ ਤੋਂ ਜ਼ਿਆਦਾ ਪਾਰਟੀਆਂ ਵਾਲੇ ਗਰਾਫਿਕਸ ਬਣਾਉਣ ਲਈ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ。
ਕੇਵਲ ਹੇਠ ਲਿਖੇ ਕੋਡ ਨੂੰ ਨੋਟਬੁੱਕ ਵਿੱਚ ਕਾਪੀ ਕਰੋ, ਫਿਰ ਫਾਇਲ ਨੂੰ "polygon1.svg" ਵਜੋਂ ਸੰਭਾਲੋ। ਇਹ ਫਾਇਲ ਆਪਣੇ web ਡਾਇਰੈਕਟਰੀ ਵਿੱਚ ਰੱਖੋ:
?xml version="1.0" standalone="no"?> !DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <polygon points="220,100 300,210 170,250"} style="fill:#cccccc; stroke:#000000;stroke-width:1"/> </svg>
ਕੋਡ ਵਿਸ਼ੇਸ਼ਤਾ
points ਪ੍ਰਾਪਰਟੀ ਵਿੱਚ ਪ੍ਰਤੀ ਪੁੰਜ ਦੇ x ਅਤੇ y ਸਕੋਰਸ ਦਿੱਤੇ ਜਾਂਦੇ ਹਨ
ਹੇਠਲੇ ਉਦਾਹਰਣ ਵਿੱਚ ਇੱਕ ਚੌਕਾ ਬਣਾਇਆ ਜਾਂਦਾ ਹੈ:
?xml version="1.0" standalone="no"?> !DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <polygon points="220,100 300,210 170,250 123,234" style="fill:#cccccc; stroke:#000000;stroke-width:1"/> </svg>