首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Attributes(属性)

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

A

  • accent-height
  • accumulate
  • additive
  • alignment-baseline
  • ascent
  • attributeName
  • attributeType
  • azimuth

B

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

C

  • calcMode
  • class
  • clip
  • clipPathUnits
  • clip-path
  • clip-rule
  • color
  • color-interpolation
  • color-interpolation-filters
  • color-profile
  • color-rendering
  • contentScriptType
  • contentStyleType
  • cursor
  • cx
  • cy

D

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

E

  • edgeMode
  • elevation
  • end
  • 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
  • from
  • fr
  • fx
  • fy

G

  • gradientTransform
  • gradientUnits

H

  • height
  • href

I

  • image-rendering
  • in
  • in2

K

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

L

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

M

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

N

  • numOctaves

O

  • opacity
  • operator
  • order
  • overflow
  • overline-position
  • overline-thickness

P

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

R

  • r
  • radius
  • refX
  • repeatCount
  • repeatDur
  • requiredFeatures
  • restart
  • result
  • rx
  • ry

S

  • scale
  • seed
  • shape-rendering
  • specularConstant
  • specularExponent
  • stdDeviation
  • stitchTiles
  • stop-color
  • stop-opacity
  • strikethrough-position
  • strikethrough-thickness
  • stroke
  • stroke-dasharray
  • stroke-dashoffset
  • stroke-linecap
  • stroke-linejoin
  • stroke-miterlimit
  • stroke-opacity
  • stroke-width
  • style
  • surfaceScale

T

  • tabindex
  • targetX
  • targetY
  • text-anchor
  • text-decoration
  • text-rendering
  • textLength
  • to
  • transform
  • type

U

  • underline-position
  • underline-thickness

V

  • values
  • version
  • viewBox
  • visibility

W

  • width
  • word-spacing
  • writing-mode

X

  • x
  • x1
  • x2
  • xChannelSelector
  • xlink:href
  • xlink:show
  • xlink:title
  • xml:lang
  • xml:space

Y

  • y
  • y1
  • y2
  • yChannelSelector

Z

  • z

SVG属性(按类别分)

动画事件属性(Animation event attributes

动画属性的目标属性(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

核心属性(Core attributes

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

文档事件属性(Document event attributes)

过滤初始属性(Filter primitive attributes

height, result, width, x, y

图形事件属性(Graphical event attributes

表现属性(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

XLink属性(XLink attributes

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

扫码关注腾讯云开发者

领取腾讯云代金券