SVG 參考手冊

1. SVG元素模塊
Animation.Module animate animateColor animateTransform animateMotion set mpath
剪裁模塊 clipPath
顏色輪廓模塊 color-profile
條件處理模塊 switch
光標模塊 cursor
擴展性模塊 foreignObject
過濾器模塊 filter feFlood feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feFlood feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset feSpecularLighting feTile feTurbulence feDistantLight fePointLight feSpotLight feFuncR feFuncG feFuncB feFuncA
Font.Module fontfont-face glyph missing-glyph hkern vkern font-face-src font-face-uri font-face-format font-face-name definition-src
梯度模塊 linearGradientradialGradientstop
Hyperlink.Module a
圖像模塊 image
標記模塊 marker
遮罩模塊 mask
陣列模塊 pattern
腳本模塊 script
造型模塊 path rect circle line polyline polygon ellipse
結構模塊 svg g defs desc title metadata symbol use
樣式模塊 style
文本模塊 text tspan tref textPath altGlyph altGlyphDef altGlyphItem glyphRef
視圖模塊 view

2.SVG解釋的元素
2.1 超連接模塊
元素 屬性 描述
a Core.attrib, Conditional.attrib, Style.attrib, transform, target,GraphicalEvents.attrib, Presentation.attrib, External.attrib,XLinkReplace.attrib 聯結一組圖元, 以連接屬性(本地或非本地 URI)。該連接在可視化過程當中處於非活動狀態,但每次轉換到 CGM 時都保存該連接。
2.2 圖像模塊
元素 屬性 內容模型
image Core.attrib, XLinkEmbed.attrib, Conditional.attrib, Style.attrib, External.attrib, GraphicalEvents.attrib, preserveAspectRatio, Paint.attrib, Opacity.attrib, Graphics.attrib,Cursor.attrib, Filter.attrib, Mask.attrib, GraphicalEvents.attrib, Clip.attrib, Profile.attrib, Viewport.attrib, transform, x, y, width, height 描述經過外部文件連接(相對路徑或絕對路徑)或經過 base64 編碼(這種狀況下,能夠讀取的格式有:BMP、JPEG、TIFF 或 PNG)定義的矢量圖像或位圖圖像。
支持外部位圖圖像連接,但不支持矢量圖像連接。
2.3 標記模塊
元素 屬性 內容模型
marker Core.attrib, External.attrib, Style.attrib,Presentation.attrib, viewBox,preserveAspectRatio,refX, refY,markerUnits, markerWidth, markerHeight,
orient
經過標記屬性定義一組重用做標記的圖元。
不考慮 markerUnits 屬性,它被視爲與屬性 userSpaceOnUse 相同。
不考慮 orient 屬性,標記不按照路徑段定向。應用標記時始終不定向。
2.4 陣列模塊
元素 屬性 內容模型
pattern Core.attrib, XLink.attrib, Conditional.attrib , External.attrib, Style.attrib, Presentation.attrib, viewBox, preserveAspectRatio, patternTransform, x, y, width, height, patternUnits 定義一組重用於填充或繪製造型的圖元。
不考慮 patternUnits 屬性,它被視爲與屬性 userSpaceOnUse 相同。
僅解釋用位圖陣列定義的陣列。不識別用向量元素集定義的陣列。
所以,陣列元素的子級應爲 <image> 類型。這樣能夠讀取包含填充紋理的工程製圖文檔。
2.5 造型模塊
元素 屬性 內容模型
path Core.attrib, Conditional.attrib, External.attrib, Style.attrib, transform, d, pathLength, GraphicalEvents.attrib, Paint.attrib, Opacity.attrib, Graphics.attrib, Cursor.attrib, Filter.attrib, Mask.attrib, GraphicalEvents.attrib, Clip.attrib, Marker.attrib 定義造型的輪廓。它由圓弧、橢圓弧、直線、三次貝塞爾曲線和二次貝塞爾曲線組成。此輪廓能夠是封閉的或開放的。
rect Core.attrib, Conditional.attrib, Style.attrib, GraphicalEvents.attrib, Paint.attrib, Opacity.attrib, Graphics.attrib, Cursor.attrib, Filter.attrib, Mask.attrib, GraphicalEvents.attrib, Clip.attrib, x, y, width, height, rx,ry,transform 定義矩形。
不解釋圓角。
circle Core.attrib, Conditional.attrib, Style.attrib, GraphicalEvents.attrib, Paint.attrib, Opacity.attrib, Graphics.attrib, Cursor.attrib, Filter.attrib, Mask.attrib, GraphicalEvents.attrib, Clip.attrib, cx, cy, r, transform 定義圓。
line Core.attrib, Conditional.attrib, Style.attrib, GraphicalEvents.attrib, Paint.attrib, Opacity.attrib, Graphics.attrib, Cursor.attrib, Filter.attrib, Mask.attrib, GraphicalEvents.attrib, Clip.attrib, x1, y1, x2, y2, transform 定義直線。
ellipse Core.attrib, Conditional.attrib, Style.attrib, GraphicalEvents.attrib, Paint.attrib, Opacity.attrib, Graphics.attrib, Cursor.attrib, Filter.attrib, Mask.attrib, GraphicalEvents.attrib, Clip.attrib, cx, cy, rx, ry, transform 定義橢圓。
polyline Core.attrib, Conditional.attrib, Style.attrib, GraphicalEvents.attrib, Paint.attrib, Opacity.attrib, Graphics.attrib, Cursor.attrib, Filter.attrib, Mask.attrib, GraphicalEvents.attrib, Clip.attrib,points, transform 定義折線。
若是折線處於開放模式,則僅繪製輪廓,不填充折線。
polygon Core.attrib, Conditional.attrib, Style.attrib, GraphicalEvents.attrib, Paint.attrib, Opacity.attrib, Graphics.attrib, Cursor.attrib, Filter.attrib, Mask.attrib, GraphicalEvents.attrib, Clip.attrib,points, transform 定義多邊形
2.6 結構模塊
元素 屬性 內容模型
svg Core.attrib, Conditional.attrib, Style.attrib, x, y, width, height, viewBox, preserveAspectRatio, zoomAndPan, version, baseProfile, contentScriptType, contentStyleType, External.attrib, Presentation.attrib, GraphicalEvents.attrib, DocumentEvents.attrib 編組 SVG 圖像。
g Core.attrib, Conditional.attrib, Style.attrib, External.attrib, Presentation.attrib, GraphicalEvents.attrib, transform 將具備相同屬性的一個或多個元素編組在一塊兒。
defs Core.attrib, Conditional.attrib, Style.attrib, External.attrib, Presentation.attrib, GraphicalEvents.attrib, transform 定義要重用的元素組。它的子級所以是參考元素。
desc Core.attrib, Style.attrib 描述元素。
title Core.attrib, Style.attrib 指示元素的標題。
symbol Core.attrib, Style.attrib, External.attrib, viewBox, preserveAspectRatio, Presentation.attrib, GraphicsElementEventAttrs 定義一組要重用的元素。
use Core.attrib, Style.attrib, Conditional.attrib, transform,x, y, width, height, XLinkEmbed.attrib, Presentation.attrib, GraphicsElementEventAttrs 參考一組預約義元素以便顯示它。
2.7 文本模塊
元素 屬性 內容模型
text Core.attrib, Conditional.attrib, External.attrib, Style.attrib, transform, x, y, dx,dy,rotate, textLength,lengthAdjust, GraphicalEvents.attrib,Paint.attrib, Font.attrib, Opacity.attrib, Graphics.attrib, Cursor.attrib, Filter.attrib, Mask.attrib, GraphicalEvents.attrib, Clip.attrib, TextContent.attrib, Text.attrib 定義文本。 文本顏色是筆畫顏色定義的顏色,若是沒有明肯定義筆畫顏色,則使用填充顏色。

3、SVG模塊屬性
3.1 動畫屬性集
集合名稱 集合屬性
Animation.attrib XLink.attrib
AnimationAttribute.attrib attributeName, attributeType
AnimationTiming.attrib begin, dur, end, min, max, restart, repeatCount, repeatDur, fill
AnimationValue.attrib calcMode, values, keyTimes, keySplines, from, to, by
AnimationAddtion.attrib additive, accumulate
3.2 動畫事件屬性模塊
集合名稱 集合屬性
AnimationEvents.attrib onbegin, onend, onrepeat, onload
3.3 剪裁屬性集
集合名稱 集合屬性
Clip.attrib clip-path, clip-rule
3.4 條件處理屬性集
集合名稱 集合屬性
Conditional.attrib requiredFeatures, requiredExtensions, systemLanguage
3.5 容器屬性模塊
集合名稱 集合屬性
Container.attrib enable-background
3.6 內核屬性模塊
集合名稱 集合屬性
Core.attrib id, xml:base, xml:lang, xml:space
3.7 光標屬性集
集合名稱 集合屬性
Cursor.attrib cursor
3.8 文檔事件屬性模塊
集合名稱 集合屬性
DocumentEvents.attrib onunload, onabort, onerror, onresize, onscroll, onzoom
3.9 外部資源要求屬性模塊
集合名稱 集合屬性
External.attrib externalResourcesRequired
3.10 梯度屬性集
集合名稱 集合屬性
Gradient.attrib stop-color, stop-opacity
3.11 圖形元素事件屬性模塊
集合名稱 集合屬性
GraphicalEvents.attrib onfocusin, onfocusout, onactivate, onclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onload
3.12 圖形屬性模塊
集合名稱 集合屬性
Graphics.attrib display, image-rendering, pointer-events, shape-rendering, text-rendering,visibility
3.13 過濾器屬性集
集合名稱 集合屬性
Filter.attrib filter
FilterColor.attrib color-interpolation-filters
FilterPrimitive.attrib x, y, width, height, result
FilterPrimitiveWithIn.attrib FilterPrimitive.attrib, in
3.14 標記屬性集
集合名稱 集合屬性
Marker.attrib marker-start, marker-mid, marker-end
3.15 遮罩屬性集
集合名稱 集合屬性
Mask.attrib mask
3.16 不透明屬性模塊
集合名稱 集合屬性
Opacity.attrib opacity, stroke-opacity, fill-opacity
3.17 塗料屬性模塊
集合名稱 集合屬性
Paint.attrib color, fill, fill-rule, stroke, stroke-dasharray,
stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width, color-interpolation, color-rendering
3.18 樣式屬性集
集合名稱 集合屬性
Style.attrib style, class
3.19 文本屬性集
集合名稱 集合屬性
Text.attrib writing-mode
TextContent.attrib alignment-baseline, baseline-shift, direction, dominant-baseline, glyph-orientation-horizontal, glyph-orientation-vertical, kerning, letter-spacing, text-anchor, text-decoration, unicode-bidi, word-spacing
Font.attrib font-family, font-size, font-size-adjust, font-stretch, font-style, font-variant, font-weight
3.20 視口屬性模塊
集合名稱 集合屬性
Viewport.attrib clip, overflow
  
3.21 XLink 屬性模塊
集合名稱 集合屬性
XLink.attrib xlink:type, xlink:href, xlink:role, xlink:arcrole, xlink:title, xlink:show, xlink:actuate
XLinkRequired.attrib xlink:type, xlink:href, xlink:role, xlink:arcrole, xlink:title, xlink:show, xlink:actuate
XLinkEmbed.attrib xlink:type, xlink:href, xlink:role, xlink:arcrole, xlink:title, xlink:show, xlink:actuate
XLinkReplace.attrib xlink:type, xlink:href, xlink:role, xlink:arcrole, xlink:title, xlink:show, xlink:actuate

4、SVG解釋的屬性
4.1 內核屬性模塊
集合名稱 集合屬性
id 圖形圖元的標識符。

4.2 圖形屬性模塊
集合名稱 集合屬性
display 顯示或隱藏圖形圖元。 僅解釋值「none」。
4.3 標記屬性集
集合名稱 集合屬性
marker-start 在圖元的第一個點繪製標記。
marker-mid 在圖元的每一個其它點(即除第一個點和最後一個點)繪製標記。
marker-end 在圖元的最後一個點繪製標記。
4.4 不透明屬性模塊
集合名稱 集合屬性
opacity 定義圖元的透明度。
只有可以另存爲光柵圖像的格式才能夠管理透明度。所以,不顯示透明度。
並且,即便當另存爲光柵圖像時,透明度也不支持嵌套。
stroke-opacity 定義圖元輪廓的透明度。
只有可以另存爲光柵圖像的格式才能夠管理透明度。所以,不顯示透明度。
並且,即便當另存爲光柵圖像時,透明度也不支持嵌套。
fill-opacity 定義圖元填充的透明度。
只有可以另存爲光柵圖像的格式才能夠管理透明度。所以,不顯示透明度。
並且,即便當另存爲光柵圖像時,透明度也不支持嵌套。
4.5 塗料屬性模塊
集合名稱 集合屬性
color 定義顏色。<color> 類型符合 sRGB 空間中定義的顏色的 CSS2 規格。該屬性支持 [CSS2-color-types] 中定義的幾種語法(有關詳細信息,請訪問 w3c.org Internet 站點),還支持一個關鍵字列表,列表中的每一個關鍵字與一種顏色關聯。 支持的數字顏色規格語法有:#rgb 或 #rrggbb 或 rgb(R, G, B) 或 rgb(R%, G%, B%)。

下面是使用不一樣的語法指定相同顏色的示例:

EM { color:#f00 } /* #rgb */
EM { color:#ff0000 } /* #rrggbb */
EM { color:rgb(255,0,0) } /* integer range 0 - 255 */
EM { color:rgb(100%, 0%, 0%) } /* float range 0.0% - 100.0% */
fill 定義填充類型。
支持「none」、「current-color」值或顏色。
不支持梯度。
fill-rule 定義填充多邊形時使用的算法。
僅支持「nonzero」算法。
不支持「evenodd」算法。
stroke 定義如何繪製元素。
支持「none」、「current-color」值或顏色。
不支持陣列和梯度。
stroke-dasharray 定義爲獲得點線所應用的陣列。
stroke-linecap 定義繪製輪廓時在輪廓的末尾使用的造型:round, square 等。
以向量格式保存時包括此屬性。可是,不支持顯示和以光柵格式保存它。
stroke-linejoin 定義繪製折線的角時使用的造型:round, miter 等。
以向量格式保存時包括此屬性。可是,不支持顯示和以光柵格式保存它。
stroke-width 定義筆畫寬度。
以向量格式保存時包括此屬性。可是,使用細寬度能夠描繪很是粗的筆畫。
4.6 樣式屬性集
集合名稱 集合屬性
style 將全部屬性編組在一塊兒。
4.7 文本屬性集
集合名稱 集合屬性
letter-spacing 定義每一個字符之間使用的間距。
TrueType 字體顯示不支持該屬性,所以也不支持大量的生成器(離散化)。
text-anchor 定義文本對齊方式。
font-family 定義字體系列的名稱。
僅正確解釋第 5 版支持的字體,不然使用默認字體。更多信息...
font-size 定義文本高度。
高度必須定義爲長度或百分比。
font-weight 定義是使用粗體仍是普通樣式呈現文本。
TrueType 字體顯示不支持該屬性,所以也不支持大量的生成器(離散化)。
4.8 XLink 屬性模塊
集合名稱 集合屬性
xlink:href 定義連接。爲連接元素或定義光柵圖像解釋該屬性。
xlink:show 定義如何顯示連接指向的資源。
4.9 變換屬性  分析和處理變換屬性。應用下面的變換: 
  • matrix(<a> <b> <c> <d> <e> <f>),以六個值的變換矩陣形式指定變換
  • translate(<tx> [<ty>]),經過 tx 和 ty 指定平移
  • scale(<sx> [<sy>]),經過 sx 和 sy 指定縮放操做
  • rotate(<rotate-angle> [<cx> <cy>]),指定繞給定點旋轉 <rotate-angle> 度
  • skewX(<skew-angle>),指定沿 x 軸的扭曲變換
  • skewY(<skew-angle>),指定沿 y 軸的扭曲變換。

SVG 元素

 

元素 說明 屬性
<a> 建立一個SVG元素周圍連接 xlink:show
xlink:actuate
xlink:href
target
<altGlyph> 容許對象性文字進行控制,來呈現特殊的字符數據 x
y
dx
dy
rotate
glyphRef
format
xlink:href
<altGlyphDef> 定義一系列象性符號的替換 id
<altGlyphItem> 定義一系列候選的象性符號的替換 id
<animate> 隨時間動態改變屬性 attributeName="目標屬性名稱"
from="起始值"
to="結束值"
dur="持續時間"
repeatCount="動畫時間將發生"
<animateColor> 定義隨着時間的推移顏色轉換 by="相對偏移值"
from="起始值"
to="結束值"
<animateMotion> 使元素沿着動做路徑移動 calcMode="動畫的插補模式。能夠是'discrete', 'linear', 'paced', 'spline'"
path="運動路徑"
keyPoints="沿運動路徑的對象目前時間應移動多遠"
rotate="應用旋轉變換"
xlink:href="一個URI引用<path>元素,它定義運動路徑"
<animateTransform> 動畫上一個目標元素變換屬性,從而使動畫控制平移,縮放,旋轉或傾斜 by="相對偏移值"
from="起始值"
to="結束值"
type="類型的轉換其值是隨時間變化。能夠是 'translate', 'scale', 'rotate', 'skewX', 'skewY'"
<circle> 定義一個圓 cx="圓的x軸座標"
cy="圓的y軸座標"
r="圓的半徑". 必需.

+ 顯現屬性:顏色,FillStroke,圖形
<clipPath> 用於隱藏位於剪切路徑之外的對象部分。定義繪製什麼和什麼不繪製的模具被稱爲剪切路徑 clip-path="引用剪貼路徑和引用剪貼路徑交叉"
clipPathUnits="userSpaceOnUse'或'objectBoundingBox"。第二個值childern一個對象的邊框,會使用掩碼的一小部分單位(默認:"userSpaceOnUse")"
<color-profile> 指定顏色配置文件的說明(使用CSS樣式文件時) local="本地存儲顏色配置文件惟一ID"
name=""
rendering-intent="auto|perceptual|relative-colorimetric|saturation|absolute-colorimetric"
xlink:href="ICC配置文件資源URI"
<cursor> 定義一個獨立於平臺的自定義光標 x="x軸左上角光標(默認爲0)"
y="y軸的左上角光標(默認爲0)"
xlink:href="使用光標圖像URI
<defs> 引用的元素容器  
<desc> 對 SVG 中的元素的純文本描述 - 並不做爲圖形的一部分來顯示。用戶代理會將其顯示爲工具提示  
<ellipse> 定義一個橢圓 cx="橢圓x軸座標"
cy="橢圓y軸座標"
rx="沿x軸橢圓形的半徑"。必需。
ry="沿y軸長橢圓形的半徑"。必需。

+ 顯現屬性:顏色,FillStroke,圖形
<feBlend> 使用不一樣的混合模式把兩個對象合成在一塊兒 mode="圖像混合模式:normal|multiply|screen|darken|lighten"
in="標識爲給定的濾鏡原始輸入:SourceGraphic | SourceAlpha | BackgroundImage | BackgroundAlpha | FillPaint | StrokePaint | <filter-primitive-reference>"
in2="第二輸入圖像的混合操做"
feColorMatrix SVG濾鏡。適用矩陣轉換  
feComponentTransfer SVG 濾鏡。執行數據的 component-wise 重映射  
feComposite SVG 濾鏡  
feConvolveMatrix SVG 濾鏡  
feDiffuseLighting SVG 濾鏡  
feDisplacementMap SVG 濾鏡  
feDistantLight SVG濾鏡。定義一個光源  
feFlood SVG濾鏡  
feFuncA SVG 濾鏡。feComponentTransfer 的子元素  
feFuncB SVG 濾鏡。feComponentTransfer 的子元素  
feFuncG SVG 濾鏡。feComponentTransfer 的子元素  
feFuncR SVG 濾鏡。feComponentTransfer 的子元素  
feGaussianBlur SVG濾鏡。執行高斯模糊圖像  
feImage SVG濾鏡。  
feMerge SVG濾鏡。創建在彼此頂部圖像層  
feMergeNode SVG 濾鏡。feMerge的子元素  
feMorphology SVG 濾鏡。 對源圖形執行"fattening" 或者 "thinning"  
feOffset SVG濾鏡。相對其當前位置移動圖像  
fePointLight SVG濾鏡  
feSpecularLighting SVG濾鏡  
feSpotLight SVG濾鏡  
feTile SVG濾鏡  
feTurbulence SVG濾鏡  
filter 濾鏡效果的容器  
font 定義字體  
font-face 描述一種字體的特色  
font-face-format    
font-face-name    
font-face-src    
font-face-uri    
foreignObject    
<g> 用於把相關元素進行組合的容器元素 id="該組的名稱"
fill="該組填充顏色"
opacity="該組不透明度"

+ 顯現屬性:
All
glyph 爲給定的象形符號定義圖形  
glyphRef 定義要使用的可能的象形符號  
hkern    
<image> 定義圖像 x="圖像的左上角的x軸座標"
y="圖像的左上角的y軸座標"
width="圖像的寬度". 必須.
height="圖像的高度". 必須.
xlink:href="圖像的路徑". 必須.

+ 顯現屬性:
Color, Graphics, Images, Viewports
<line> 定義一條線 x1="直線起始點x座標"
y1="直線起始點y座標"
x2="直線終點x座標"
y2="直線終點y座標"

+ 顯現屬性:
Color, FillStroke, Graphics, Markers
<linearGradient> 定義線性漸變。經過使用矢量線性漸變填充對象,並能夠定義爲水平,垂直或角漸變。 id="id 屬性可爲漸變定義一個惟一的名稱。引用必須"
gradientUnits="'userSpaceOnUse' or 'objectBoundingBox'.使用視圖框或對象,以肯定相對位置矢量點。 (默認爲'objectBoundingBox)"
gradientTransform="適用於漸變的轉變"
x1="漸變向量x啓動點(默認0%)"
y1="漸變向量y啓動點(默認0%)" 
x2="漸變向量x的終點。 (默認100%)"
y2="漸變向量y的終點。 (默認0%)" 
spreadMethod="'pad' or 'reflect' or 'repeat'"
xlink:href="reference to another gradient whose attribute values are used as defaults and stops included. Recursive"
<marker> 標記能夠放在直線,折線,多邊形和路徑的頂點。這些元素可使用maeker屬性的"maeker-start","maeker-mid"和"maeker-end",繼承默認狀況下或可設置爲"none"或定義的標記的URI。您必須先定義標記,而後才能夠經過其URI引用。任何一種形狀,能夠把標記放在裏面。他們繪製元素時把它們附加到頂部 markerUnits="strokeWidth'或'userSpaceOnUse"。若是是strokeWidth"那麼使用一個單位等於一個筆劃寬度。不然,標記尺度不會使用同一視圖單位做爲引用元素(默認爲'strokeWidth')"
refx="標記頂點鏈接的位置(默認爲0)"
refy="標記頂點鏈接的位置(默認爲0)"
orient="'auto'始終顯示標記的角度。 "auto"將計算某個角度使得X軸一個頂點的正切值(默認爲0)
markerWidth="標記的寬度(默認3)"
markerHeight="標記的高度(默認3)"
viewBox="各點"看到"這個SVG繪圖區域。由空格或逗號分隔的4個值。(min x, min y, width, height)" 

+ presentation attributes:
All
<mask> 度屏蔽是一種不透明度值的組合和裁剪。像裁剪,您可使用圖形,文字或路徑定義掩碼的部分。一個掩碼的默認狀態是徹底透明的,也就是裁剪平面的對面的。在掩碼的圖形設置掩碼的不透明部分 maskUnits="'userSpaceOnUse' or 'objectBoundingBox'.設定裁剪面是不是相對完整的視窗或對象(默認:'objectBoundingBox')"
maskContentUnits="第二個掩碼相對對象的圖形位置使用百分比'userSpaceOnUse'或'objectBoundingBox'(默認:'userSpaceOnUse')"
x="裁剪面掩碼(默認值:-10%)" 
y="裁剪面掩碼(默認值:-10%)" 
width="裁剪面掩碼(默認是:120%)"
height="裁剪面掩碼(默認是:120%)"
metadata 指定元數據  
missing-glyph    
mpath    
<path> 定義一個路徑 d="定義路徑指令"
pathLength="若是存在,路徑將進行縮放,以便計算各點至關於此值的路徑長度"
transform="轉換列表"

+ 顯現屬性:
Color, FillStroke, Graphics, Markers
<pattern> 定義座標,你想要的視圖顯示和視圖的大小。而後添加到您的模式形狀。該模式命中時重複視圖框的邊緣(可視範圍) id="用於引用這個模式的惟一ID。"必需的。 
patternUnits="userSpaceOnUse'或'objectBoundingBox"。第二個值X,Y,width,height 一個會使用模式對象的邊框的小部分,單位(%)。"
patternContentUnits="'userSpaceOnUse'或 'objectBoundingBox'"
patternTransform="容許整個表達式進行轉換"
x="模式的偏移量,來自左上角(默認爲0)" 
y="模式的偏移量,來自左上角(默認爲0)"
width="模式平鋪的寬度(默認爲100%)" 
height="模式平鋪的高度(默認爲100%)"
viewBox="各點"看到"這個SVG繪圖區域。由空格或逗號分隔的4個值。(min x, min y, width, height)" 
xlink:href="另外一種模式,其屬性值是默認值以及任何子類能夠繼承。遞歸"
 
<polygon> 定義一個包含至少三邊圖形 points="多邊形的點。點的總數必須是偶數"。必需的。
fill-rule="FillStroke演示屬性的部分"

+ 顯現屬性:
Color, FillStroke, Graphics, Markers
<polyline> 定義只有直線組成的任意形狀 points=折線上的"點"。必需的。

+ 顯現屬性:
Color, FillStroke, Graphics, Markers
<radialGradient> 定義放射性漸變。放射性漸變建立一個圓圈 gradientUnits="'userSpaceOnUse' or 'objectBoundingBox'. 使用視圖框或對象以肯定相對位置的矢量點。 (默認爲'objectBoundingBox)"
gradientTransform="適用於漸變的變換" 
cx="漸變的中心點(數字或% - 50%是默認)"
cy="漸變的中心點。 (默認50%)"
r="漸變的半徑。 (默認50%)" 
fx="漸變的焦點。 (默認0%)"
fy="漸變的焦點。 (默認0%)"
spreadMethod="'pad' or 'reflect' or 'repeat'"
xlink:href="引用到另外一個漸變,其屬性值做爲默認值。遞歸"
<rect> 定義一個矩形 x="矩形的左上角的x軸"
y="矩形的左上角的y軸"
rx="x軸的半徑(round元素)"
ry="y軸的半徑(round元素)" 
width="矩形的寬度"。必需的。
height="矩形的高度"。必需的。

+ 顯現屬性:
Color, FillStroke, Graphics
script 腳本容器。(例如ECMAScript)  
set 設置一個屬性值指定時間  
<stop> 漸變中止 offset="偏移中止(0到1/0%到100%)". 參考
stop-color="這個stop的顏色" 
stop-opacity="這個Stop的不透明度 (0到1)"
style 可以使樣式表直接嵌入SVG內容內部  
<svg> 建立一個SVG文檔片斷 x="左上角嵌入(默認爲0)"
y="左上角嵌入(默認爲0)"
width="SVG片斷的寬度(默認爲100%)"
height="SVG片斷的高度(默認爲100%)"
viewBox="點"seen"這個SVG繪圖區域。由空格或逗號分隔的4個值。 (min x, min y, width, height)"
preserveAspectRatio="'none'或任何'xVALYVAL'的9種組合,VAL是"min","mid"或"max"。(默認狀況下none)"
zoomAndPan="'magnify' or 'disable'.Magnify選項容許用戶平移和縮放您的文件(默認Magnify )"
xml="最外層<svg>元素都須要安裝SVG和它的命名空間: xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve""

+ 顯現屬性:
All
switch    
symbol    
<text> 定義一個文本 x="列表的X -軸的位置。在文本中在第n個字符的位置在第n個x軸。若是後面存在額外的字符,耗盡他們最後一個字符以後放置的位置。 0是默認"
y="列表的Y軸位置。(參考x)0是默認"
dx="在字符的長度列表中移動相對最後繪製標誌符號的絕對位置。(參考x)"
dy="在字符的長度列表中移動相對最後繪製標誌符號的絕對位置。(參考x)" 
rotate="一個旋轉的列表。第n個旋轉是第n個字符。附加字符沒有給出最後的旋轉值"
textLength="SVG查看器將嘗試顯示文本之間的間距/或字形調整的文本目標長度。(默認:正常文本的長度)"
lengthAdjust="告訴查看器,若是指定長度就嘗試進行調整用以呈現文本。這兩個值是'spacing'和'spacingAndGlyphs'"

+ 顯現屬性:
Color, FillStroke, Graphics, FontSpecification, TextContentElements
textPath    
title 對 SVG 中的元素的純文本描述 - 並不做爲圖形的一部分來顯示。用戶代理會將其顯示爲工具提示  
<tref> 引用任何SVG文檔中的<text>元素和重用 相同的<TEXT>元素
<tspan> 元素等同於<text>,但能夠在內部嵌套文本標記以及內部自己 Identical to the <text> element
+ in addition:
xlink:href="引用一個<TEXT>元素"
<use> 使用URI引用一個<G>,<svg>或其餘具備一個惟一的ID屬性和重複的圖形元素。複製的是原始的元素,所以文件中的原始存在只是一個參考。原始影響到全部副本的任何改變。 x="克隆元素的左上角的x軸"
y="克隆元素的左上角的y軸"
width="克隆元素的寬度"
height="克隆元素的高度"
xlink:href="URI引用克隆元素"

+ 顯現屬性:
All
view    
vkern
相關文章
相關標籤/搜索