SVG API
SVG 提供用于绘制圆形、矩形以及简单与复杂曲线的元素。元素的属性值指定了这些图形的绘制方式。SVG API 是 DOM 的一个子集,通过在内存中表示这些 SVG 元素及其属性值,将它们与脚本或编程语言连接起来。SVG API 提供了可用于以编程方式访问 SVG 元素及其属性值的方法。
SVG API 是一组接口,已被归类为以下几大类:
- 元素接口提供对 SVG 元素属性的访问以及用于操作它们的方法。
- 静态数据类型接口提供对元素属性值的访问以及用于操作这些值的方法。
- 对于可动画的属性,动画数据类型接口提供对当前动画属性的值的只读访问。
- 同步多媒体集成语言(SMIL)接口
- 其他
接口
>SVG 元素接口
SVGAElementSVGAnimationElementSVGAnimateElementSVGAnimateMotionElementSVGAnimateTransformElementSVGCircleElementSVGClipPathElementSVGComponentTransferFunctionElementSVGDefsElementSVGDescElementSVGDiscardElementSVGElementSVGEllipseElementSVGFEBlendElementSVGFEColorMatrixElementSVGFEComponentTransferElementSVGFECompositeElementSVGFEConvolveMatrixElementSVGFEDiffuseLightingElementSVGFEDisplacementMapElementSVGFEDistantLightElementSVGFEDropShadowElementSVGFEFloodElementSVGFEFuncAElementSVGFEFuncBElementSVGFEFuncGElementSVGFEFuncRElementSVGFEGaussianBlurElementSVGFEImageElementSVGFEMergeElementSVGFEMergeNodeElementSVGFEMorphologyElementSVGFEOffsetElementSVGFEPointLightElementSVGFESpecularLightingElementSVGFESpotLightElementSVGFETileElementSVGFETurbulenceElementSVGFilterElementSVGForeignObjectElementSVGGElementSVGGeometryElementSVGGradientElementSVGGraphicsElementSVGImageElementSVGLinearGradientElementSVGLineElementSVGMarkerElement实验性SVGMaskElementSVGMetadataElementSVGMPathElementSVGPathElementSVGPatternElementSVGPolylineElementSVGPolygonElementSVGRadialGradientElementSVGRectElementSVGScriptElementSVGSetElementSVGStopElementSVGStyleElementSVGSVGElementSVGSwitchElementSVGSymbolElementSVGTextContentElementSVGTextElementSVGTextPathElementSVGTextPositioningElementSVGTitleElementSVGTSpanElementSVGUseElementSVGViewElement
SVG 数据类型接口
以下是用于在 SVG 属性和属性定义中使用的数据类型的 DOM API。
静态类型
SVGAngleSVGLengthSVGLengthListSVGNumberSVGNumberListSVGPreserveAspectRatioSVGStringListSVGTransformSVGTransformList
动画类型
与 SMIL 相关的接口
其他 SVG 接口
规范
| Specification |
|---|
| Scalable Vector Graphics (SVG) 2> |