Playing with svg g tags.
tutoial original from http://tutorials.jenkov.com/svg/index.html
Playing with svg g tags.
tutoial original from http://tutorials.jenkov.com/svg/index.html
<html> | |
<head> | |
</head> | |
<body> | |
<svg> | |
<svg> | |
<g> | |
<line x="10" y="10" x1="60" y1="10" style="stroke: #006"/> | |
<rect x="10" y="20" width="30" height="40" style="stroke: red; fill:#CCC"/> | |
<text x="10" y="80" style="stroke: red; fill:#CCC">Testing SVG</text> | |
</g> | |
<!-- rotated 180 degrees around the point 200,50. --> | |
<g transform="rotate(180, 200, 50)"> | |
<line x="10" y="10" x1="60" y1="10" style="stroke: #006"/> | |
<rect x="10" y="20" width="30" height="40" style="stroke: red; fill:#CCC"/> | |
<text x="10" y="80" style="stroke: red; fill:#CCC">Testing SVG</text> | |
</g> | |
</svg> | |
<!-- g tag is not working with x, y, you will have to set to svg tag --> | |
<svg y="100"> | |
<!-- element in side g tag will inherient the styles --> | |
<g style="stroke: red; fill:#CCC" y="100"> | |
<line x="10" y="10" x1="60" y1="10"/> | |
<rect x="10" y="20" width="30" height="40"/> | |
<text x="10" y="80">Testing SVG</text> | |
</g> | |
</svg> | |
</svg> | |
</body> | |
</html> |