非常教程

SVG参考手册

属性 | Attributes

Attributes(属性)

可以使用详细指定了元素应该如何处理或渲染的属性来修改SVG元素。下面是SVG中所有可用属性的列表,以及指向参考文档的链接,以帮助您了解哪些元素支持这些属性以及它们是如何工作的。

A

  • accent-height
  • accumulate
  • additive
  • alignment-baseline
  • allowReorder
  • alphabetic
  • amplitude
  • arabic-form
  • ascent
  • attributeName
  • attributeType
  • autoReverse
  • azimuth

B

  • baseFrequency
  • baseline-shift
  • baseProfile
  • bbox
  • begin
  • bias
  • by

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

  • d
  • decelerate
  • descent
  • diffuseConstant
  • direction
  • display
  • divisor
  • dominant-baseline
  • dur
  • dx
  • dy

E

  • edgeMode
  • elevation
  • enable-background
  • end
  • exponent
  • externalResourcesRequired

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

  • hanging
  • height
  • href
  • horiz-adv-x
  • horiz-origin-x

I

  • id
  • ideographic
  • image-rendering
  • in
  • in2
  • intercept

K

  • k
  • k1
  • k2
  • k3
  • k4
  • kernelMatrix
  • kernelUnitLength
  • kerning
  • keyPoints
  • keySplines
  • keyTimes

L

  • lang
  • lengthAdjust
  • letter-spacing
  • lighting-color
  • limitingConeAngle
  • local

M

  • marker-end
  • marker-mid
  • marker-start
  • markerHeight
  • markerUnits
  • markerWidth
  • mask
  • maskContentUnits
  • maskUnits
  • mathematical
  • max
  • media
  • method
  • min
  • mode

N

  • name
  • numOctaves

O

  • offset
  • onabort
  • onactivate
  • onbegin
  • onclick
  • onend
  • onerror
  • onfocusin
  • onfocusout
  • onload
  • onmousedown
  • onmousemove
  • onmouseout
  • onmouseover
  • onmouseup
  • onrepeat
  • onresize
  • onscroll
  • onunload
  • opacity
  • operator
  • order
  • orient
  • orientation
  • origin
  • overflow
  • overline-position
  • overline-thickness

P

  • panose-1
  • paint-order
  • pathLength
  • patternContentUnits
  • patternTransform
  • patternUnits
  • pointer-events
  • points
  • pointsAtX
  • pointsAtY
  • pointsAtZ
  • preserveAlpha
  • preserveAspectRatio
  • primitiveUnits

R

  • r
  • radius
  • refX
  • refY
  • 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

  • u1
  • u2
  • underline-position
  • underline-thickness
  • unicode
  • unicode-bidi
  • unicode-range
  • units-per-em

V

  • v-alphabetic
  • v-hanging
  • v-ideographic
  • v-mathematical
  • values
  • version
  • vert-adv-y
  • vert-origin-x
  • vert-origin-y
  • viewBox
  • viewTarget
  • visibility

W

  • width
  • widths
  • word-spacing
  • writing-mode

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

  • y
  • y1
  • y2
  • yChannelSelector

Z

  • z
  • zoomAndPan

SVG属性(按类别分)

动画事件属性(Animation event attributes

onbegin, onend, onload, onrepeat

动画属性的目标属性(Animation attribute target attributes

attributeType, attributeName

动画计时属性(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

additive, accumulate

条件处理属性(Conditional processing attributes

requiredExtensions, requiredFeatures, systemLanguage.

核心属性(Core attributes

id, xml:base, xml:lang, xml:space, tabindex

文档事件属性(Document event attributes)

onabort, onerror, onresize, onscroll, onunload

过滤初始属性(Filter primitive attributes

height, result, width, x, y

图形事件属性(Graphical event attributes

onactivate, onclick, onfocusin, onfocusout, onload, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup

表现属性(Presentation attributes

请注意,所有的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, text-decoration, text-rendering, unicode-bidi, visibility, word-spacing, writing-mode

样式属性(Style attributes

class, style

传递函数属性(Style attributes

type, tableValues, slope, intercept, amplitude, exponent, offset

XLink属性(XLink attributes

xlink:href, xlink:type, xlink:role, xlink:arcrole, xlink:title, xlink:show, xlink:actuate

属性 | Attributes相关

1.accent-height(焦点高度)
2.accumulate(积累)
3.additive
4.alignment-baseline(对齐基线)
5.ascent
6.attributename(属性名字)
7.attributetype(属性类型)
8.azimuth(方位)
9.basefrequency
10.baseline-shift(基线漂移)
11.baseprofile
12.begin(开始)
13.bias(偏压)
14.calcmode
15.class
16.clip(剪辑)
17.clip-path(剪辑路径)
18.clip-rule(剪辑规则)
19.clippathunits
20.color(颜色)
21.color-interpolation(彩色插值)
22.color-interpolation-filters(色彩插值滤波器)
23.color-profile(彩色轮廓)
24.color-rendering(显色)
25.contentscripttype
26.contentstyletype
27.cursor(光标)
28.cx
29.cy
30.d
31.diffuseconstant
32.direction(方向)
33.display(显示)
34.divisor
35.dominant-baseline(显性基线)
36.dur
37.dx
38.dy
39.edgemode
40.elevation
41.end
42.externalresourcesrequired
43.fill
44.fill-opacity
45.fill-rule
46.filter
47.filterres
48.filterunits
49.flood-color
50.flood-opacity
51.font-family
52.font-size
53.font-size-adjust
54.font-stretch
55.font-style
56.font-variant
57.font-weight
58.fr
59.from
60.fx
61.fy
62.gradienttransform
63.gradientunits
64.height
65.href
66.image-rendering
67.in
68.in2
69.k1
70.k2
71.k3
72.k4
73.kernelmatrix
74.kernelunitlength
75.kerning
76.keysplines
77.keytimes
78.lengthadjust
79.letter-spacing
80.lighting-color
81.limitingconeangle
82.local
83.marker-end
84.marker-mid
85.marker-start
86.markerheight
87.markerunits
88.markerwidth
89.mask
90.maskcontentunits
91.maskunits
92.max
93.min
94.mode
95.numoctaves
96.opacity
97.operator
98.order
99.overflow
100.overline-position
SVG

可缩放矢量图形是基于可扩展标记语言(标准通用标记语言的子集),用于描述二维矢量图形的一种图形格式。它由万维网联盟制定,是一个开放标准。