close
SVG是一種以XML定義二維向量圖現的圖形格式,由W3C制定,是一個開啟的標準。
例如有一個001.svg的圖片如下:
以記事本開啟001.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"
version="1.1"
width="252.80942"
height="100.89236"
id="svg2">
id="defs4" />
id="metadata7">
rdf:about="">
image/svg+xml
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
transform="translate(-105.26811,-111.91601)"
id="layer1">
width="251.91707"
height="100"
rx="5.5981574"
ry="50"
x="105.71429"
y="112.36218"
id="rect2985"
style="fill:#008000;stroke:#000000;stroke-width:0.89235312;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
x="151.42857"
y="178.07648"
id="text2987"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans">
x="151.42857"
y="178.07648"
id="tspan2989">文字測試
SVG可以像一般的圖片以的Tag或直接內嵌到HTML5來呈現,例如下列測試的網頁TEST01.html:
TEST 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"
version="1.1"
width="252.80942"
height="100.89236"
id="svg2">
id="defs4" />
id="metadata7">
rdf:about="">
image/svg+xml
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
transform="translate(-105.26811,-111.91601)"
id="layer1">
width="251.91707"
height="100"
rx="5.5981574"
ry="50"
x="105.71429"
y="112.36218"
id="rect2985"
style="fill:#008000;stroke:#000000;stroke-width:0.89235312;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
x="151.42857"
y="178.07648"
id="text2987"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans">
x="151.42857"
y="178.07648"
id="tspan2989">文字測試
例如有一個001.svg的圖片如下:
以記事本開啟001.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"
version="1.1"
width="252.80942"
height="100.89236"
id="svg2">
id="layer1">
height="100"
rx="5.5981574"
ry="50"
x="105.71429"
y="112.36218"
id="rect2985"
style="fill:#008000;stroke:#000000;stroke-width:0.89235312;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
y="178.07648"
id="text2987"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans">
y="178.07648"
id="tspan2989">文字測試
SVG可以像一般的圖片以的Tag或直接內嵌到HTML5來呈現,例如下列測試的網頁TEST01.html:
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"
version="1.1"
width="252.80942"
height="100.89236"
id="svg2">
id="layer1">
height="100"
rx="5.5981574"
ry="50"
x="105.71429"
y="112.36218"
id="rect2985"
style="fill:#008000;stroke:#000000;stroke-width:0.89235312;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
y="178.07648"
id="text2987"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans">
y="178.07648"
id="tspan2989">文字測試