How to change SVG transform (rotate) attribute into CSS? - html

I got this transform attribute from SVG:
transform="rotate(15.331623, 679.50173, 211.39806)"
And then I tried this as a replacement but it does not work.
transform: rotate(15.331623deg, 679.50173deg, 211.39806deg)
From the code above, the browser gives me an error Invalid property value. How do I achieve this using CSS?
This is the sample code of the SVG
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg1369"
width="289.13361"
height="281.64835">
<g
transform="rotate(36.765794,489.48582,-457.27544)"
id="g5384-3">
<g
id="g5217-6">
<path
inkscape:connector-curvature="0"
id="path198-6-7"
style="opacity:0.1;isolation:isolate;mix-blend-mode:darken;fill:#231f20"
d="m 691.89441,148.35857 7.87141,19.66707 6.59397,16.4721 0.84011,107.96654 0.0447,5.95194 a 21.51,21.51 0 0 1 -0.26518,3.60192 l -24.83847,19.16058 -47.60875,0.41562 -103.55223,0.83225 -5.93791,0.0465 -21.47201,0.14518 -4.50999,0.0311 -31.96312,0.28145 -5.63546,0.0784 -6.14063,-15.34415 -6.23361,-15.5629 -20.64084,-51.54485 c -0.18233,-0.46557 -0.38118,-0.96892 -0.50311,-1.4053 l -0.11857,-13.61155 -0.42391,-54.11922 a 22.57,22.57 0 0 1 22.38558,-22.74964 l 150.44158,-1.19811 21.86587,-0.15852 61.27829,-0.54099 0.086,-0.003 a 22.25,22.25 0 0 1 8.43632,1.58775 z" />
</g>
</g>
</svg>

The SVG transform attribute's second and third values are a location to rotate around and as such are not angles.
CSS transforms specify the rotation location via the separate transform-origin property.
#g5384-3 {
transform: rotate(36.765794deg);
transform-origin: 489.48582px -457.27544px;
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg1369"
width="289.13361"
height="281.64835">
<g id="g5384-3">
<g
id="g5217-6">
<path
inkscape:connector-curvature="0"
id="path198-6-7"
style="opacity:0.1;isolation:isolate;mix-blend-mode:darken;fill:#231f20"
d="m 691.89441,148.35857 7.87141,19.66707 6.59397,16.4721 0.84011,107.96654 0.0447,5.95194 a 21.51,21.51 0 0 1 -0.26518,3.60192 l -24.83847,19.16058 -47.60875,0.41562 -103.55223,0.83225 -5.93791,0.0465 -21.47201,0.14518 -4.50999,0.0311 -31.96312,0.28145 -5.63546,0.0784 -6.14063,-15.34415 -6.23361,-15.5629 -20.64084,-51.54485 c -0.18233,-0.46557 -0.38118,-0.96892 -0.50311,-1.4053 l -0.11857,-13.61155 -0.42391,-54.11922 a 22.57,22.57 0 0 1 22.38558,-22.74964 l 150.44158,-1.19811 21.86587,-0.15852 61.27829,-0.54099 0.086,-0.003 a 22.25,22.25 0 0 1 8.43632,1.58775 z" />
</g>
</g>
</svg>

Related

Cannot access last SVG image in a single file

I have the following svg file with three SVG images inside:
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<!-- Circular Arrow -->
<symbol id="circular-arrow" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<g transform="matrix(-1 0 0 1 1025.9 0)">
<path transform="matrix(-1 0 0 1 1025.9 0)" d="m970.62 20.137-132.6 125.35c-88.627-77.213-202.54-120.16-320.83-120.16-129.5 0-253.78 51.476-345.35 143.05-91.573 91.573-143.05 215.85-143.05 345.36 0 129.5 51.477 253.78 143.05 345.35 91.573 91.573 215.85 143.05 345.35 143.05 129.5-1e-4 253.78-51.478 345.36-143.05 91.573-91.573 143.05-215.85 143.05-345.35 0-2.962-0.167-5.9052-0.2208-8.8613l-149.94 2.3301c0.04204 2.1787 0.16211 4.3479 0.16211 6.5312 0 89.78-35.633 175.81-99.117 239.29-63.484 63.484-149.51 99.117-239.29 99.117-89.78 0-175.81-35.633-239.29-99.117-63.484-63.484-99.117-149.51-99.117-239.29 0-89.78 35.633-175.81 99.117-239.29s149.51-99.117 239.29-99.117c77.097 0 151.43 26.279 211.09 73.904l-118.94 112.44 158.12 0.06836 158.13 0.07031 22.514-170.84 22.516-170.84z" color="#000000" color-rendering="auto" dominant-baseline="auto" image-rendering="auto" shape-rendering="auto" solid-color="#000000" stop-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;isolation:auto;mix-blend-mode:normal;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</symbol>
<!-- Speech bubble -->
<symbol id="speech-bubble" height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill="currentColor" fill-rule="evenodd" id="Icons with numbers" stroke="none" stroke-width="1"><g fill="currentColor" id="Group" transform="translate(-720.000000, -192.000000)"><path d="M728,205 C727.092687,205 726.225692,204.86437 725.430064,204.617506 C724.617765,205.250987 723.248775,206.131104 721.912598,206.131104 C722.612692,205.468456 722.810743,204.184192 722.854217,203.228743 C721.703165,202.248586 721,200.938813 721,199.5 C721,196.462434 724.134007,194 728,194 C731.865993,194 735,196.462434 735,199.5 C735,202.537566 731.865993,205 728,205 Z M728,205" id="Oval 247"/></g></g></symbol>
</symbol>
<!-- Loupe -->
<symbol id="loupe" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
<path fill="none" stroke-width="36" stroke-linecap="round"
d="m280,278a153,153 0 1,0-2,2l170,170m-91-117 110,110-26,26-110-110"/>
</symbol>
</svg>
I can access the first 2 SVG images with help of this html code:
Example:
<svg>
<use href="img/icons.svg#speech-bubble"></use>
</svg>
But the last one doesn't work. It is independent of the image. If I move "Speech bubble" to the bottom I won't be able to access this one and "Loupe" works perfectly fine again.
Typo: you have an extra closing tag at line 12 - the one for the Speech bubble

SVG shape hase extra height

I have made this shape with inkskape
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="86.708229mm"
height="108.46725mm"
viewBox="0 0 86.708229 108.46725"
version="1.1"
id="svg5"
inkscape:export-filename="bitmap.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false" />
<defs
id="defs2">
<linearGradient
inkscape:collect="always"
id="linearGradient1332">
<stop
style="stop-color:#2ebdbe;stop-opacity:1;"
offset="0"
id="stop1330" />
<stop
style="stop-color:#bbfbf2;stop-opacity:1;"
offset="1"
id="stop1328" />
</linearGradient>
<inkscape:path-effect
effect="fillet_chamfer"
id="path-effect427"
is_visible="true"
lpeversion="1"
nodesatellites_param="F,0,0,1,0,3.175,0,4 # F,0,0,1,0,3.175,0,4 # F,0,0,1,0,3.175,0,4 # F,0,0,1,0,3.175,0,4 # F,0,0,1,0,3.175,0,4 # F,0,0,1,0,3.175,0,4"
unit="px"
method="auto"
mode="F"
radius="12"
chamfer_steps="4"
flexible="false"
use_knot_distance="true"
apply_no_radius="true"
apply_with_radius="true"
only_selected="false"
hide_knots="false" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1332"
id="linearGradient1338"
x1="-8.7238359"
y1="103.88622"
x2="137.07281"
y2="33.141083"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0169463,0,0,0.56544787,9.4308219,-0.08872541)" />
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-60.976129,-17.450189)">
<path
id="path424"
style="opacity:1;fill:url(#linearGradient1338);fill-opacity:1;stroke:#ffffff;stroke-width:1.00318;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
inkscape:transform-center-x="-2.7149655"
inkscape:transform-center-y="0.12577677"
d="M 74.631466,44.717104 62.421924,34.403638 a 2.6778389,2.6778389 90.043215 0 1 0.0031,-4.093976 L 74.671628,19.996493 a 8.6973678,8.6973678 159.95323 0 1 5.603571,-2.044714 l 48.153211,0.0067 a 8.6807368,8.6807368 20.098102 0 1 5.60047,2.049272 l 12.20963,10.313627 a 2.6778292,2.6778292 90.04357 0 1 -0.003,4.093967 l -12.24664,10.313026 a 8.6974755,8.6974755 159.95346 0 1 -5.60359,2.044695 l -48.153211,-0.0067 a 8.680796,8.680796 20.097976 0 1 -5.600483,-2.049262 z"
sodipodi:nodetypes="ccccccc"
inkscape:path-effect="#path-effect427"
inkscape:original-d="M 77.056949,46.765923 59.996441,32.354819 77.100199,17.951336 l 54.503211,0.0076 17.06057,14.411285 -17.10382,14.403302 z"
inkscape:export-filename=".\path424.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
</g>
</svg>
and the shape is ok But the overall height is so much more that the shape
in this picture I've opened it in browser and as you see the height is 409.95px
that is not desirable
how can I remove the extra height of that ?
just some bela bela to let me post this
just some bela bela to let me post this
just some bela bela to let me post this
Remove the width and the height attributes from <svg> and alter the viewBox so that it matches the size of the content.
In this example I also removed the transform attribute from the <g> and replaced the path itself using the tool SvgPathEditor.
Now the path takes up 100% of the box and the aspect ratio matches the content.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
viewBox="0 0 86 29"
version="1.1"
id="svg5"
inkscape:export-filename="bitmap.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false" />
<defs
id="defs2">
<linearGradient
inkscape:collect="always"
id="linearGradient1332">
<stop
style="stop-color:#2ebdbe;stop-opacity:1;"
offset="0"
id="stop1330" />
<stop
style="stop-color:#bbfbf2;stop-opacity:1;"
offset="1"
id="stop1328" />
</linearGradient>
<inkscape:path-effect
effect="fillet_chamfer"
id="path-effect427"
is_visible="true"
lpeversion="1"
nodesatellites_param="F,0,0,1,0,3.175,0,4 # F,0,0,1,0,3.175,0,4 # F,0,0,1,0,3.175,0,4 # F,0,0,1,0,3.175,0,4 # F,0,0,1,0,3.175,0,4 # F,0,0,1,0,3.175,0,4"
unit="px"
method="auto"
mode="F"
radius="12"
chamfer_steps="4"
flexible="false"
use_knot_distance="true"
apply_no_radius="true"
apply_with_radius="true"
only_selected="false"
hide_knots="false" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1332"
id="linearGradient1338"
x1="-8.7238359"
y1="103.88622"
x2="137.07281"
y2="33.141083"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0169463,0,0,0.56544787,9.4308219,-0.08872541)" />
</defs>
<g
id="layer1">
<path
id="path424"
style="opacity:1;fill:url(#linearGradient1338);fill-opacity:1;stroke:#ffffff;stroke-width:1.00318;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
d="M 13.2315 26.7653 L 1.0219 16.4518 a 2.6778 2.6778 90.0432 0 1 0.0031 -4.094 L 13.2716 2.0447 a 8.6974 8.6974 159.9532 0 1 5.6036 -2.0447 l 48.1532 0.0067 a 8.6807 8.6807 20.0981 0 1 5.6005 2.0493 l 12.2096 10.3136 a 2.6778 2.6778 90.0436 0 1 -0.003 4.094 l -12.2466 10.313 a 8.6975 8.6975 159.9535 0 1 -5.6036 2.0447 l -48.1532 -0.0067 a 8.6808 8.6808 20.098 0 1 -5.6005 -2.0493 z" />
</g>
</svg>
the attribute width/height in the SVG tag force it to be that many millimeters and thus so many pixels - if you remove the attributes and view the SVG file in a browser it will take up the entire viewport dimensions .. either way the viewBox attribute needs to be precise too, or left out. Depending on your usage you may want to set width/height both to 100% and the viewBox to the SVG size of your drawing - reduce the canvas in your SVG editor (apparently Inkscape) before exporting to its minimal size.

How can I close or remove the circle that is contained in my svg?

I am new to the svg theme, and I would like to know if it is possible to remove the white circle from my bookmark.
This is the code of my svg:
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="512px" height="512px" viewBox="0 0 485.213 485.212" style="enable-background:new 0 0 485.213 485.212;" xml:space="preserve">
<g>
<path d="M242.606,0C142.124,0,60.651,81.473,60.651,181.955c0,40.928,13.504,78.659,36.31,109.075l145.646,194.183L388.252,291.03 c22.808-30.416,36.31-68.146,36.31-109.075C424.562,81.473,343.089,0,242.606,0z M242.606,303.257 c-66.989,0-121.302-54.311-121.302-121.302c0-66.989,54.313-121.304,121.302-121.304c66.991,0,121.302,54.315,121.302,121.304 C363.908,248.947,309.598,303.257,242.606,303.257z" fill="#d82c62" stroke="#d82c62"/>
</g>
</svg>
I want that the circle does not exist, that is to say that the figure is like this image:
thank you very much.
https://jsfiddle.net/L10m35ny/
This svg is a path so the circle is contained somewhere in
<svg><path d="here you have svg path"/></svg>
The easiest way to do it is to open svg file in any editor like Corel Draw, Adobe Ilustrator or other available for free (it's a vector image so it won't open in paint). You should create a new map marker and export to new svg file. You will get completely different path.
UPDATE
This is the svg you are looking for.
<svg viewBox="0 0 26900 35810" xmlns="http://www.w3.org/2000/svg">
<path fill="#D82C62" d="m13406 35810c424-340 9325-12335 10071-13340 1180-1589 2146-2848 2818-5086 2756-9189-4320-17352-12785-17384-9099-34-15490 8788-12948 17248 980 3261 3947 6682 6125 9588l5018 6693c517 689 1266 1582 1701 2281z"/>
</svg>
simply Right click on your svg and open with notepad
and replace this code
<svg width="485.213" height="485.212" xmlns="http://www.w3.org/2000/svg">
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="402" width="582" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<g id="farthardly">
<path id="svg_1" stroke="#d82c62" fill="#d82c62" d="m242.606,0c-100.482,0 -181.955,81.473 -181.955,181.955c0,40.928 13.504,78.659 36.31,109.075l145.646,194.183l145.645,-194.183c22.808,-30.416 36.31,-68.146 36.31,-109.075c0,-100.482 -81.473,-181.955 -181.956,-181.955zm0,303.257c-66.989,0 -121.302,-54.311 -121.302,-121.302c0,-66.989 54.313,-121.304 121.302,-121.304c66.991,0 121.302,54.315 121.302,121.304c0,66.992 -54.31,121.302 -121.302,121.302z"/>
</g>
<ellipse stroke="#d82c62" ry="121.999997" rx="126.999996" id="svg_2" cy="180.606014" cx="240.106494" stroke-width="1.5" fill="#d82c62"/>
</g>
</svg>
output
result

svg in img tag not showing (modified with illustrator clipping mask)

I have a svg image of an instagram icon that I exported with clipping mask in Illustrator.
However, when I I try to display it, it doesn't show in any browser. (Other social icons showed)
I used the img tag to display the svg as it is displayed finely with other icons. Am I doing something wrong? Does img tag support clipping mask images?
Sorry that I don't have much experience with svg. Any suggestion is very appreciated! Thanks!
Here is my code:
<nav id="socialNav">
<ul>
<li><img src="../../_images/social-facebook.svg"></li>
<li><img src="../../_images/social-instagram_color-01.svg"></li>
<li><img src="../../_images/social-twitter.svg"></li>
<li><img src="../../_images/social-googleplus_test.svg"></li>
</ul>
</nav>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="56.7px" height="56.7px" viewBox="0 0 56.7 56.7" enable-background="new 0 0 56.7 56.7" xml:space="preserve">
<g>
<g>
<defs>
<path id="SVGID_1_" d="M28.2,16.7c-7,0-12.8,5.7-12.8,12.8c0,7.1,5.7,12.799,12.8,12.799C35.299,42.299,41,36.5,41,29.5
C41,22.5,35.2,16.7,28.2,16.7z M28.2,37.7C23.7,37.7,20,34,20,29.5c0-4.5,3.7-8.202,8.2-8.202c4.5,0,8.2,3.7,8.2,8.202
C36.4,34,32.7,37.7,28.2,37.7z M41.5,13.5c1.602,0,2.898,1.298,2.898,2.9s-1.298,2.9-2.898,2.9c-1.602,0-2.9-1.298-2.9-2.9
S39.899,13.5,41.5,13.5z M49,8.9C46.4,6.2,42.7,4.8,38.5,4.8H17.9c-8.7,0-14.5,5.8-14.5,14.5v20.5c0,4.302,1.4,8,4.2,10.701
C10.3,53.1,13.9,54.4,18,54.4h20.4c4.3,0,7.899-1.399,10.5-3.899C51.6,47.9,53,44.2,53,39.9V19.3C53,15.1,51.6,11.5,49,8.9z
M48.4,39.9c0,3.101-0.899,5.601-2.7,7.3c-1.8,1.7-4.3,2.6-7.3,2.6H18c-3,0-5.5-0.898-7.3-2.6c-1.8-1.8-2.7-4.3-2.7-7.4V19.3
c0-3,0.9-5.5,2.7-7.3c1.7-1.7,4.3-2.6,7.3-2.6h20.6c3,0,5.5,0.9,7.3,2.7c1.7,1.8,2.7,4.3,2.7,7.2v20.6H48.4z"/>
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" overflow="visible"/>
</clipPath>
<g id="LF6r1C.tif_2_" clip-path="url(#SVGID_2_)">
<image overflow="visible" enable-background="new " width="601" height="514" id="Layer_0_3_" xlink:href="B91C5780217A8A7F.png" transform="matrix(0.0961 0 0 0.1609 -2.4072 -11.1685)">
</image>
</g>
</g>
</g>
</svg>
Here'e the image with a few changes. The clip-path's coords have instead been used to create a path, which is then filled with a radial gradient. The file is now simply a filled path, rather than a clipped image. It's going to scale better, is 99% smaller (1283 bytes total vs 135Kb just for the gradient) and avoids the problem inherent with linked (vs embedded) files. Enjoy! Hit the Blue button to see it.
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 56.7 56.7" viewBox="0 0 56.7 56.7" y="0px" x="0px" width='56.7' height='56.7'>
<defs>
<radialGradient id="a" gradientUnits="userSpaceOnUse" cy="47.1" cx="16.48" gradientTransform="matrix(2.215 0 0 2.215 -20.03 -57.24)" r="25.3">
<stop stop-color="#f9d363" offset="0"/>
<stop stop-color="#f26c1f" offset=".3658"/>
<stop stop-color="#ce0665" offset=".6829"/>
<stop stop-color="#541fdb" offset="1"/>
</radialGradient>
</defs>
<path d="m28.2 16.7c-7 0-12.8 5.7-12.8 12.8s5.7 12.8 12.8 12.8 12.8-5.8 12.8-12.8-5.8-12.8-12.8-12.8zm0 21c-4.5 0-8.2-3.7-8.2-8.2s3.7-8.202 8.2-8.202 8.2 3.7 8.2 8.202c0 4.5-3.7 8.2-8.2 8.2zm13.3-24.2c1.602 0 2.898 1.298 2.898 2.9s-1.298 2.9-2.898 2.9c-1.602 0-2.9-1.298-2.9-2.9s1.299-2.9 2.9-2.9zm7.5-4.6c-2.6-2.7-6.3-4.1-10.5-4.1h-20.6c-8.7 0-14.5 5.8-14.5 14.5v20.5c0 4.302 1.4 8 4.2 10.7 2.7 2.6 6.3 3.9 10.4 3.9h20.4c4.3 0 7.899-1.399 10.5-3.899 2.7-2.6 4.1-6.3 4.1-10.6v-20.6c0-4.2-1.4-7.8-4-10.4zm-0.6 31c0 3.101-0.899 5.601-2.7 7.3-1.8 1.7-4.3 2.6-7.3 2.6h-20.4c-3 0-5.5-0.898-7.3-2.6-1.8-1.8-2.7-4.3-2.7-7.4v-20.5c0-3 0.9-5.5 2.7-7.3 1.7-1.7 4.3-2.6 7.3-2.6h20.6c3 0 5.5 0.9 7.3 2.7 1.7 1.8 2.7 4.3 2.7 7.2v20.6h-0.2z" fill-rule="evenodd" fill="url(#a)"/>
</svg>

Inline SVG - How to Put an image.svg onto a Page

I'm only new to Inline SVG and from my reading it sounds really interesting. I expecially like the way it can maintain multiple colors (which are currently lost ith icon fonts).
Following is an graphic created in Adobe Illistrator and exported as an SVG:
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 15.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="265.427px" height="105.59px" viewBox="0 0 265.427 105.59" enable-background="new 0 0 265.427 105.59"
xml:space="preserve">
<g id="Edit_Button_1_">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="132.7144" y1="10.8496" x2="132.7144" y2="90.4107">
<stop offset="0.099" style="stop-color:#F5F6F6"/>
<stop offset="0.8267" style="stop-color:#E9E9E9"/>
</linearGradient>
<rect x="0.474" y="0.474" fill="url(#SVGID_1_)" stroke="#CDCCCC" stroke-width="0.9479" stroke-miterlimit="10" width="264.479" height="104.643"/>
<g>
<g>
<g>
<g>
<polygon fill="#6F6F6F" points="27.945,62.067 20.953,83.479 42.234,76.368 "/>
</g>
<g>
<path fill="#6F6F6F" d="M67.206,22.81c3.765-3.827,9.988-3.805,14.024,0.166c4.024,3.969,4.154,10.186,0.39,14.013
L67.206,22.81z"/>
</g>
<polygon fill="#6F6F6F" points="45.999,72.609 31.698,58.312 62.865,27.153 77.16,41.45 "/>
</g>
</g>
</g>
<text transform="matrix(1 0 0 1 100.8813 74.3232)" fill="#6F6F6F" font-family="'Verdana'" font-size="57.8802">EDIT</text>
</g>
</svg>
I'm confussed on how to put this onto a HTML page. Do I just copy the <svg> to </svg> tags?
Is there any conversion/optimisation required?
I've also read about defining SVG Files for later use: http://css-tricks.com/svg-sprites-use-better-icon-fonts/
What are the advantages/disadvantages of this?
thankyou so much!!
Yes. You only need to copy the <svg> section. The XML pre-amble lines (<?xml> and <!DOCTYPE>) are not required.
Demo here