SVG 属性参考
SVG 元素可以通过属性来修改,这些属性指定有关如何处理或呈现元素的详细信息。 下面列出了 SVG 中所有的可用属性以及参考文档的链接,以帮助您了解哪些元素支持它们,以及它们如何工作。
SVG 属性(从 A-Z 排序)
A
accent-height
accumulate
additive (en-US)
alignment-baseline
allowReorder
alphabetic (en-US)
amplitude (en-US)
arabic-form (en-US)
ascent (en-US)
attributeName
attributeType
autoReverse
azimuth (en-US)
B
C
calcMode
cap-height (en-US)
class (en-US)
clip
clipPathUnits (en-US)
clip-path
clip-rule (en-US)
color
color-interpolation (en-US)
color-interpolation-filters (en-US)
color-profile (en-US)
color-rendering (en-US)
contentScriptType (en-US)
contentStyleType (en-US)
cursor (en-US)
cx
cy
D
d
decelerate
descent (en-US)
diffuseConstant (en-US)
direction (en-US)
display
divisor (en-US)
dominant-baseline
dur
dx
dy (en-US)
E
F
fill
fill-opacity
fill-rule
filter
filterRes (en-US)
filterUnits
flood-color (en-US)
flood-opacity (en-US)
font-family
font-size (en-US)
font-size-adjust (en-US)
font-stretch (en-US)
font-style (en-US)
font-variant (en-US)
font-weight (en-US)
format (en-US)
from
fr
fx
fy
G
g1 (en-US)
g2 (en-US)
glyph-name (en-US)
glyph-orientation-horizontal (en-US)
glyph-orientation-vertical (en-US)
glyphRef (en-US)
gradientTransform (en-US)
gradientUnits (en-US)
H
I
K
k (en-US)
k1 (en-US)
k2 (en-US)
k3 (en-US)
k4 (en-US)
kernelMatrix
kernelUnitLength (en-US)
kerning (en-US)
keyPoints (en-US)
keySplines (en-US)
keyTimes
L
lang (en-US)
lengthAdjust (en-US)
letter-spacing
lighting-color (en-US)
limitingConeAngle (en-US)
local (en-US)
M
marker-end
marker-mid (en-US)
marker-start
markerHeight (en-US)
markerUnits (en-US)
markerWidth (en-US)
mask
maskContentUnits (en-US)
maskUnits (en-US)
mathematical (en-US)
max
media
method (en-US)
min (en-US)
mode (en-US)
N
O
offset
opacity
operator (en-US)
order
orient (en-US)
orientation (en-US)
origin
overflow
overline-position (en-US)
overline-thickness (en-US)
P
panose-1 (en-US)
paint-order (en-US)
path
pathLength
patternContentUnits (en-US)
patternTransform (en-US)
patternUnits
ping
pointer-events
points
pointsAtX (en-US)
pointsAtY (en-US)
pointsAtZ (en-US)
preserveAlpha
preserveAspectRatio
primitiveUnits
R
r
radius
referrerPolicy
refX (en-US)
refY (en-US)
rel
rendering-intent (en-US)
repeatCount
repeatDur (en-US)
requiredExtensions
requiredFeatures (en-US)
restart (en-US)
result
rotate (en-US)
rx
ry (en-US)
S
scale
seed
shape-rendering
slope (en-US)
spacing (en-US)
specularConstant (en-US)
specularExponent (en-US)
speed
spreadMethod (en-US)
startOffset (en-US)
stdDeviation
stemh (en-US)
stemv (en-US)
stitchTiles (en-US)
stop-color (en-US)
stop-opacity (en-US)
strikethrough-position (en-US)
strikethrough-thickness (en-US)
string
stroke
stroke-dasharray
stroke-dashoffset
stroke-linecap
stroke-linejoin
stroke-miterlimit
stroke-opacity
stroke-width
style
surfaceScale (en-US)
systemLanguage (en-US)
T
tabindex (en-US)
tableValues (en-US)
target
targetX (en-US)
targetY (en-US)
text-anchor
text-decoration
text-rendering (en-US)
textLength (en-US)
to (en-US)
transform
type
U
u1 (en-US)
u2 (en-US)
underline-position (en-US)
underline-thickness (en-US)
unicode (en-US)
unicode-bidi (en-US)
unicode-range (en-US)
units-per-em
V
v-alphabetic (en-US)
v-hanging (en-US)
v-ideographic (en-US)
v-mathematical (en-US)
values
vector-effect
version
vert-adv-y (en-US)
vert-origin-x (en-US)
vert-origin-y (en-US)
viewBox
viewTarget (en-US)
visibility
W
X
x
x-height (en-US)
x1 (en-US)
x2 (en-US)
xChannelSelector (en-US)
xlink:actuate
xlink:arcrole (en-US)
xlink:href (en-US)
xlink:role
xlink:show (en-US)
xlink:title (en-US)
xlink:type (en-US)
xml:base (en-US)
xml:lang (en-US)
xml:space (en-US)
Y
Z
SVG 属性(按类别分类)
Generic Attributes
核心属性
id
, lang (en-US)
, tabindex (en-US)
, xml:base (en-US)
, xml:lang (en-US)
, xml:space (en-US)
样式属性
条件处理属性
externalResourcesRequired (en-US)
, requiredExtensions
, requiredFeatures (en-US)
, systemLanguage (en-US)
.
XLink 属性
xlink:href (en-US)
, xlink:type (en-US)
, xlink:role
, xlink:arcrole (en-US)
, xlink:title (en-US)
, xlink:show (en-US)
, xlink:actuate
显示属性
alignment-baseline
, baseline-shift
, clip
, clip-path
, clip-rule (en-US)
, color
, color-interpolation (en-US)
, color-interpolation-filters (en-US)
, color-profile (en-US)
, color-rendering (en-US)
, cursor (en-US)
, direction (en-US)
, display
, dominant-baseline
, enable-background
, fill
, fill-opacity
, fill-rule
, filter
, flood-color (en-US)
, flood-opacity (en-US)
, font-family
, font-size (en-US)
, font-size-adjust (en-US)
, font-stretch (en-US)
, font-style (en-US)
, font-variant (en-US)
, font-weight (en-US)
, glyph-orientation-horizontal (en-US)
, glyph-orientation-vertical (en-US)
, image-rendering
, kerning (en-US)
, letter-spacing
, lighting-color (en-US)
, marker-end
, marker-mid (en-US)
, marker-start
, mask
, opacity
, overflow
, pointer-events
, shape-rendering
, stop-color (en-US)
, stop-opacity (en-US)
, stroke
, stroke-dasharray
, stroke-dashoffset
, stroke-linecap
, stroke-linejoin
, stroke-miterlimit
, stroke-opacity
, stroke-width
, text-anchor
, transform
, text-decoration
, text-rendering (en-US)
, unicode-bidi (en-US)
, vector-effect
, visibility
, word-spacing (en-US)
, writing-mode (en-US)
滤镜属性
滤镜原始属性
传递函数属性
type
, tableValues (en-US)
, slope (en-US)
, intercept (en-US)
, amplitude (en-US)
, exponent (en-US)
, offset
动画属性
动画属性目标属性
动画时间属性
begin
, dur
, end
, min (en-US)
, max
, restart (en-US)
, repeatCount
, repeatDur (en-US)
, fill
动画取值属性
calcMode
, values
, keyTimes
, keySplines (en-US)
, from
, to (en-US)
, by (en-US)
, autoReverse
, accelerate
, decelerate
动画额外属性
事件属性
动画事件属性
onbegin
, onend
, onrepeat
文档事件属性
onabort
, onerror
, onresize
, onscroll
, onunload
全局事件属性
oncancel
, oncanplay
, oncanplaythrough
, onchange
, onclick
, onclose
, oncuechange
, ondblclick
, ondrag
, ondragend
, ondragenter
, ondragexit
, ondragleave
, ondragover
, ondragstart
, ondrop
, ondurationchange
, onemptied
, onended
, onerror
, onfocus
, oninput
, oninvalid
, onkeydown
, onkeypress
, onkeyup
, onload
, onloadeddata
, onloadedmetadata
, onloadstart
, onmousedown
, onmouseenter
, onmouseleave
, onmousemove
, onmouseout
, onmouseover
, onmouseup
, onmousewheel
, onpause
, onplay
, onplaying
, onprogress
, onratechange
, onreset
, onresize
, onscroll
, onseeked
, onseeking
, onselect
, onshow
, onstalled
, onsubmit
, onsuspend
, ontimeupdate
, ontoggle
, onvolumechange
, onwaiting
图像事件属性
onactivate
, onfocusin
, onfocusout