SVG Attribute reference - SVG: Scalable Vector Graphics 编辑
SVG elements can be modified using attributes that specify details about exactly how the element should be handled or rendered. Below is a list of all of the attributes available in SVG along with links to reference documentation to help you learn which elements support them and how they work.
SVG attributes A to 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
transform-origin
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 attributes by category
Generic attributes
Core attributes
id
, lang
, tabindex
, xml:base
, xml:lang
, xml:space
Style attributes
Conditional processing attributes
externalResourcesRequired
, requiredExtensions
, requiredFeatures
, systemLanguage
.
XLink attributes
xlink:href
, xlink:type
, xlink:role
, xlink:arcrole
, xlink:title
, xlink:show
, xlink:actuate
Presentation attributes
Note that all SVG presentation attributes can be used as CSS properties.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
, text-decoration
, text-rendering
, transform
, transform-origin
, unicode-bidi
, vector-effect
, visibility
, word-spacing
, writing-mode
Filters attributes
Filter primitive attributes
Transfer function attributes
type
, tableValues
, slope
, intercept
, amplitude
, exponent
, offset
Animation attributes
Animation target element attributes
Animation attribute target attributes
Animation timing attributes
begin
, dur
, end
, min
, max
, restart
, repeatCount
, repeatDur
, fill
Animation value attributes
calcMode
, values
, keyTimes
, keySplines
, from
, to
, by
, autoReverse
, accelerate
, decelerate
Animation addition attributes
Event attributes
Animation event attributes
onbegin
, onend
, onrepeat
Document event attributes
onabort
, onerror
, onresize
, onscroll
, onunload
Global event attributes
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
Graphical event attributes
onactivate
, onfocusin
, onfocusout
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论