SVG 元素参考

SVG drawings and images are created using a wide array of elements which are dedicated to the construction, drawing, and layout of vector images and diagrams. Here you'll find reference documentation for each of the SVG elements.

SVG elements A to Z

A

C

D

E

F

G

H

I

L

M

P

R

S

T

U

V

注意: SVG 2 spec requires that any unknown elements be treated as <g> for the purpose of rendering.

SVG elements by category

Animation elements

<animate> , <animateColor> , <animateMotion> , <animateTransform> , <discard> , <mpath> , <set>

Basic shapes

<circle> , <ellipse> , <line> , <polygon> , <polyline> , <rect>

Container elements

<a> , <defs> , <g> , <marker> , <mask> , <missing-glyph> , <pattern> , <svg> , <switch> , <symbol>

Descriptive elements

<desc> , <metadata> , <title>

Filter primitive elements

<feBlend> , <feColorMatrix> , <feComponentTransfer> , <feComposite> , <feConvolveMatrix> , <feDiffuseLighting> , <feDisplacementMap> , <feDropShadow> , <feFlood> , <feFuncA> , <feFuncB> , <feFuncG> , <feFuncR> , <feGaussianBlur> , <feImage> , <feMerge> , <feMergeNode> , <feMorphology> , <feOffset> , <feSpecularLighting> , <feTile> , <feTurbulence>

Font elements

<font> , <font-face> , <font-face-format> , <font-face-name> , <font-face-src> , <font-face-uri> , <hkern> , <vkern>

Gradient elements

<linearGradient> , <radialGradient> , <stop>

Graphics elements

<circle> , <ellipse> , <image> , <line> , <path> , <polygon> , <polyline> , <rect> , <text> , <use>

Graphics referencing elements

<use>

Light source elements

<feDistantLight> , <fePointLight> , <feSpotLight>

Never-rendered elements

<clipPath> , <defs> , <hatch> , <linearGradient> , <marker> , <mask> , <metadata> , <pattern> , <radialGradient> , <script> , <style> , <symbol> , <title>

Paint server elements

<hatch> , <linearGradient> , <pattern> , <radialGradient> , <solidcolor>

Renderable elements

<a> , <circle> , <ellipse> , <foreignObject> , <g> , <image> , <line> , <path> , <polygon> , <polyline> , <rect> , <svg> , <switch> , <symbol> , <text> , <textPath> , <tspan> , <use>

注意: SVG 2 spec requires that any unknown elements be treated as <g> for the purpose of rendering.

Shape elements

<circle> , <ellipse> , <line> , <path> , <polygon> , <polyline> , <rect>

Structural elements

<defs> , <g> , <svg> , <symbol> , <use>

Text content elements

<altGlyph> , <altGlyphDef> , <altGlyphItem> , <glyph> , <glyphRef> , <textPath> , <text> , <tref> , <tspan>

Text content child elements

<altGlyph> , <textPath> , <tref> , <tspan>

Uncategorized elements

<clipPath> , <cursor> , <filter> , <foreignObject> , <hatchpath> , <script> , <style> , <view>

过时和弃用元素

警告: These are old SVG elements which are deprecated and should not be used. You should never use them in new projects, and should replace them in old projects as soon as you can. They are listed here for informational purposes only.

A

<altGlyph> , <altGlyphDef> , <altGlyphItem> , <animateColor>

C

<cursor>

F

<font> , <font-face> , <font-face-format> , <font-face-name> , <font-face-src> , <font-face-uri>

G

<glyph> , <glyphRef>

H

<hkern>

M

<missing-glyph>

T

<tref>

V

<vkern>

另请参阅

  1. SVG 元素
    1. A
      1. <a>
      2. <altGlyph>
      3. <altGlyphDef>
      4. <altGlyphItem>
      5. <animate>
      6. <animateColor>
      7. <animateMotion>
      8. <animateTransform>
    2. B-C
      1. <circle>
      2. <clipPath>
      3. <color-profile>
      4. <cursor>
    3. D
      1. <defs>
      2. <desc>
    4. E
      1. <ellipse>
    5. F
      1. <feBlend>
      2. <feColorMatrix>
      3. <feComponentTransfer>
      4. <feComposite>
      5. <feConvolveMatrix>
      6. <feDiffuseLighting>
      7. <feDisplacementMap>
      8. <feDistantLight>
      9. <feFlood>
      10. <feFuncA>
      11. <feFuncB>
      12. <feFuncG>
      13. <feFuncR>
      14. <feGaussianBlur>
      15. <feImage>
      16. <feMerge>
      17. <feMergeNode>
      18. <feMorphology>
      19. <feOffset>
      20. <fePointLight>
      21. <feSpecularLighting>
      22. <feSpotLight>
      23. <feTile>
      24. <feTurbulence>
      25. <filter>
      26. <font>
      27. <font-face>
      28. <font-face-format>
      29. <font-face-name>
      30. <font-face-src>
      31. <font-face-uri>
      32. <foreignObject>
    6. G
      1. <g>
      2. <glyph>
      3. <glyphRef>
    7. H
      1. <hkern>
    8. I
      1. <image>
    9. J-L
      1. <line>
      2. <linearGradient>
    10. M
      1. <marker>
      2. <mask>
      3. <metadata>
      4. <missing-glyph>
      5. <mpath>
    11. N-P
      1. <path>
      2. <pattern>
      3. <polygon>
      4. <polyline>
    12. Q-R
      1. <radialGradient>
      2. <rect>
    13. S
      1. <script>
      2. <set>
      3. <stop>
      4. <style>
      5. <svg>
      6. <switch>
      7. <symbol>
    14. T
      1. <text>
      2. <textPath>
      3. <title>
      4. <tref>
      5. <tspan>
    15. U
      1. <use>
    16. V-Z
      1. <view>
      2. <vkern>

Found a problem with this page?

最后修改: , 由 MDN 贡献者