--- title: Firefox对SVG 1.1的支持 slug: Web/SVG/SVG_1.1_Support_in_Firefox translation_of: Web/SVG/SVG_1.1_Support_in_Firefox ---

你可以在 W3C SVG test suite找到一些基础的SVG语法和用法的例子

注意: As of {{Gecko("2.0")}}, Gecko now supports SVG animation using SMIL. See SVG animation with SMIL for a brief overview. Full documentation for SVG is forthcoming. Someday.

元素实现状态

SVG 1.1 元素概览以及当前的支持状态

元素 Notes
Structure Module
svg
  • 已实现
  • currentScale and currentTranslate DOM attributes are implemented, but there is no pan and zoom user interface.
  • SVGSVGElement
    • Unimplemented attributes: contentScriptType, contentStyleType, viewport, currentView
    • Unimplemented bindings: getIntersectionList, getEnclosureList, checkIntersection, checkEnclosure, deselectAll
    • Recently implemented bindings:
      • getElementById {{gecko_minversion_inline("11")}}, useCurrentView {{gecko_minversion_inline("15")}}
g
  • 已实现
defs
  • 已实现
desc
  • 已实现
  • Only stored in the DOM, no user interface.
title
  • 已实现
  • The title is displayed as a tooltip when the mouse hovers over the SVG object.
metadata
  • 已实现
  • Only stored in the DOM, no user interface.
symbol
  • 已实现
use
  • 已实现
  • Doesn't completely follow <svg:use> cascading rules ({{Bug(265894)}}).
  • Doesn't deliver events to a SVGElementInstance tree ({{Bug(265895)}}).
Conditional Processing Module
switch
  • 已实现
Image Module
image
  • 已实现
Style Module
style
  • 已实现
Shape Module
path
  • 已实现
  • SVGPathElement Interface
    • Unimplemented attributes: normalizedPathSegList, animatedNormalizedPathSegList
rect
  • 已实现
circle
  • 已实现
line
  • 已实现
ellipse
  • 已实现
polyline
  • 已实现
polygon
  • 已实现
Text Module
text
  • 已实现
  • Various presentation attributes don't work (alignment-baseline, baseline-shift, dominant-baseline, kerning, letter-spacing, word-spacing, writing-mode, glyph-orientation-horizontal, glyph-orientation-vertical)
  • Recently implemented presentation attributes: direction, unicode-bidi, font-variant, text-decoration {{gecko_minversion_inline("25")}}
  • SVGTextElement
    • Recently imlemented bindings: selectSubString {{gecko_minversion_inline("25")}}
    • Recently implemented attributes: textLength, lengthAdjust {{gecko_minversion_inline("25")}}
tspan
  • 已实现
  • Various presentation attributes don't work (alignment-baseline, baseline-shift, dominant-baseline, kerning, letter-spacing, word-spacing, writing-mode, glyph-orientation-horizontal, glyph-orientation-vertical)
  • Recently implemented presentation attributes: direction, unicode-bidi, font-variant, text-decoration {{gecko_minversion_inline("25")}}
  • SVGTSpanElement
    • Recently implemented bindings: selectSubString{{gecko_minversion_inline("25")}}
    • Recently implemented attributes: textLength, lengthAdjust {{gecko_minversion_inline("25")}}
tref
  • This feature, present in early draft of the spec, has been removed from it and is therefor not implemented ({{Bug(273171)}}).
textPath
  • 已实现
  • Recently implemented bindings: selectSubString{{gecko_minversion_inline("25")}}
altGlyph
  • Implemented as tspans, no font features as of Gecko 2.0 ({{Bug(456286)}}, {{Bug(571808)}}).
altGlyphDef
  • 未实现
altGlyphItem
  • 未实现
glyphRef
  • 未实现
Marker Module
marker
  • 已实现
Color Profile Module
color-profile
  • Not implemented ({{Bug(427713)}}).
Gradient Module
linearGradient
  • 已实现
radialGradient
  • 已实现
stop
  • 已实现
Pattern Module
pattern
  • 已实现
Clip Module
clipPath
  • 已实现
Mask Module
mask
  • 已实现
Filter Module
filter
  • 已实现
  • Of the pseudo-inputs, SourceGraphic, SourceAlpha, FillPaint {{gecko_minversion_inline("17")}} and StrokePaint {{gecko_minversion_inline("17")}} are implemented.
  • Use of an unimplemented pseudo-input or filter element will cause the filter to be ignored and the referring graphic to be drawn without any filter.
feBlend
  • 已实现
feColorMatrix
  • 已实现
feComponentTransfer
  • 已实现
feComposite
  • 已实现
feConvolveMatrix
  • 已实现
feDiffuseLighting
  • 已实现
feDisplacementMap
  • 已实现
feFlood
  • 已实现
feGaussianBlur
  • 已实现
feImage
  • 已实现
  • Document fragments ({{bug(455986)}}) aren't supported in <svg:feImage>.
feMerge
  • 已实现
feMergeNode
  • 已实现
feMorphology
  • 已实现
feOffset
  • 已实现
feSpecularLighting
  • 已实现
feTile
  • 已实现
feTurbulence
  • 已实现
feDistantLight
  • 已实现
fePointLight
  • 已实现
feSpotLight
  • 已实现
feFuncR
  • 已实现
feFuncG
  • 已实现
feFuncB
  • 已实现
feFuncA
  • 已实现
Cursor Module
cursor
  • Not implemented ({{Bug(177193)}}).
Hyperlinking Module
a
  • Only xlink:href, xlink:show, xlink:target and xlink:title attributes implemented.
View Module
view
  • Implemented in Gecko 15.0 ({{Bug(512525)}}). {{gecko_minversion_inline("15.0")}}.
Scripting Module
script
  • 已实现
Animation Module
animate
  • 已实现
set
  • 已实现
animateMotion
  • 已实现
animateTransform
  • 已实现
animateColor
  • Not implemented ({{Bug(436296)}}).
mpath
  • 已实现
Font Module
font
  • Not implemented ({{Bug(119490)}}).
font-face
  • 未实现
glyph
  • 未实现
missing-glyph
  • 未实现
hkern
  • 未实现
vkern
  • 未实现
font-face-src
  • 未实现
font-face-uri
  • 未实现
font-face-format
  • 未实现
font-face-name
  • 未实现
definition-src
  • 未实现
Extensibility Module
foreignObject
  • 已实现