SVG 属性参考 - SVG 编辑
SVG 元素可以通过属性来修改,这些属性指定有关如何处理或呈现元素的详细信息。 下面列出了 SVG 中所有的可用属性以及参考文档的链接,以帮助您了解哪些元素支持它们,以及它们如何工作。
SVG 元素(从 A-Z 排序)
A
accent-height
accumulate
additive
alignment-baseline
allowReorder
alphabetic
amplitude
arabic-form
ascent
attributeName
attributeType
autoReverse
azimuth
B
C
calcMode
cap-height
class
clip
clipPathUnits
clip-path
clip-rule
color
color-interpolation
color-interpolation-filters
color-profile
color-rendering
contentScriptType
contentStyleType
cursor
cx
cy
D
E
F
fill
fill-opacity
fill-rule
filter
filterRes
filterUnits
flood-color
flood-opacity
font-family
font-size
font-size-adjust
font-stretch
font-style
font-variant
font-weight
format
from
fr
fx
fy
G
g1
g2
glyph-name
glyph-orientation-horizontal
glyph-orientation-vertical
glyphRef
gradientTransform
gradientUnits
H
I
K
L
M
marker-end
marker-mid
marker-start
markerHeight
markerUnits
markerWidth
mask
maskContentUnits
maskUnits
mathematical
max
media
method
min
mode
N
O
P
panose-1
paint-order
path
pathLength
patternContentUnits
patternTransform
patternUnits
ping
pointer-events
points
pointsAtX
pointsAtY
pointsAtZ
preserveAlpha
preserveAspectRatio
primitiveUnits
R
r
radius
referrerPolicy
refX
refY
rel
rendering-intent
repeatCount
repeatDur
requiredExtensions
requiredFeatures
restart
result
rotate
rx
ry
S
scale
seed
shape-rendering
slope
spacing
specularConstant
specularExponent
speed
spreadMethod
startOffset
stdDeviation
stemh
stemv
stitchTiles
stop-color
stop-opacity
strikethrough-position
strikethrough-thickness
string
stroke
stroke-dasharray
stroke-dashoffset
stroke-linecap
stroke-linejoin
stroke-miterlimit
stroke-opacity
stroke-width
style
surfaceScale
systemLanguage
T
tabindex
tableValues
target
targetX
targetY
text-anchor
text-decoration
text-rendering
textLength
to
transform
type
U
V
v-alphabetic
v-hanging
v-ideographic
v-mathematical
values
vector-effect
version
vert-adv-y
vert-origin-x
vert-origin-y
viewBox
viewTarget
visibility
W
X
x
x-height
x1
x2
xChannelSelector
xlink:actuate
xlink:arcrole
xlink:href
xlink:role
xlink:show
xlink:title
xlink:type
xml:base
xml:lang
xml:space
Y
Z
SVG 元素(按类别分类)
Generic Attributes
核心属性
id
, lang
, tabindex
, xml:base
, xml:lang
, xml:space
样式属性
条件处理属性
externalResourcesRequired
, requiredExtensions
, requiredFeatures
, systemLanguage
.
XLink 属性
xlink:href
, xlink:type
, xlink:role
, xlink:arcrole
, xlink:title
, xlink:show
, xlink:actuate
显示属性
注意,所有 SVG 显示属性都可以作为 CSS 属性来使用。alignment-baseline
, baseline-shift
, clip
, clip-path
, clip-rule
, color
, color-interpolation
, color-interpolation-filters
, color-profile
, color-rendering
, cursor
, direction
, display
, dominant-baseline
, enable-background
, fill
, fill-opacity
, fill-rule
, filter
, flood-color
, flood-opacity
, font-family
, font-size
, font-size-adjust
, font-stretch
, font-style
, font-variant
, font-weight
, glyph-orientation-horizontal
, glyph-orientation-vertical
, image-rendering
, kerning
, letter-spacing
, lighting-color
, marker-end
, marker-mid
, marker-start
, mask
, opacity
, overflow
, pointer-events
, shape-rendering
, stop-color
, stop-opacity
, stroke
, stroke-dasharray
, stroke-dashoffset
, stroke-linecap
, stroke-linejoin
, stroke-miterlimit
, stroke-opacity
, stroke-width
, text-anchor
, transform
, text-decoration
, text-rendering
, unicode-bidi
, vector-effect
, visibility
, word-spacing
, writing-mode
滤镜属性
滤镜原始属性
传递函数属性
type
, tableValues
, slope
, intercept
, amplitude
, exponent
, offset
动画属性
动画属性目标属性
动画时间属性
begin
, dur
, end
, min
, max
, restart
, repeatCount
, repeatDur
, fill
动画取值属性
calcMode
, values
, keyTimes
, keySplines
, from
, to
, by
, 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
参见
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论