SVG 属性参考
SVG 元素可以通过属性来修改,这些属性指定有关如何处理或渲染元素的详细信息。
下面列出了 SVG 中所有的可用属性以及参考文档的链接,以帮助你了解哪些元素支持它们,以及它们如何工作。
SVG 属性(从 A-Z 排序)
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
R
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 (en-US)
stroke
stroke-dasharray
stroke-dashoffset
stroke-linecap
stroke-linejoin
stroke-miterlimit
stroke-opacity
stroke-width
style
surfaceScale (en-US)
systemLanguage (en-US)
T
U
V
W
X
Y
Z
SVG 属性(按类别分类)
通用属性
XLink 属性
表现属性
备注: 所有 SVG 表现属性都可以作为 CSS 属性来使用。
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
cursor (en-US)
d
direction (en-US)
display
dominant-baseline (en-US)
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 (en-US)
lighting-color (en-US)
marker-end
marker-mid (en-US)
marker-start
mask
opacity
overflow (en-US)
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
text-decoration
text-rendering (en-US)
transform
transform-origin (en-US)
unicode-bidi (en-US)
vector-effect
visibility
word-spacing (en-US)
writing-mode (en-US)
滤镜属性
动画属性
- 动画目标元素属性
href (en-US)
- 动画属性目标属性
attributeType
、attributeName
- 动画时间属性
begin
、dur
、end
、min (en-US)
、max (en-US)
、restart (en-US)
、repeatCount
、repeatDur
、fill
- 动画取值属性
calcMode (en-US)
、values
、keyTimes
、keySplines (en-US)
、from
、to (en-US)
、by (en-US)
、autoReverse
、accelerate
、decelerate
- 动画累加属性
additive (en-US)
、accumulate
事件属性
onabort
onactivate
onbegin
oncancel
oncanplay
oncanplaythrough
onchange
onclick
onclose
oncuechange
ondblclick
ondrag
ondragend
ondragenter
ondragleave
ondragover
ondragstart
ondrop
ondurationchange
onemptied
onend
onended
onerror
onerror
onfocus
onfocusin
onfocusout
oninput
oninvalid
onkeydown
onkeypress
onkeyup
onload
onloadeddata
onloadedmetadata
onloadstart
onmousedown
onmouseenter
onmouseleave
onmousemove
onmouseout
onmouseover
onmouseup
onmousewheel
onpause
onplay
onplaying
onprogress
onratechange
onrepeat
onreset
onresize
onresize
onscroll
onscroll
onseeked
onseeking
onselect
onshow
onstalled
onsubmit
onsuspend
ontimeupdate
ontoggle
onunload
onvolumechange
onwaiting