SVGLineElement

SVGLineElement interface provides access to the properties of <line> elements, as well as methods to manipulate them.

特性

This interface also inherits properties from its parent, SVGGeometryElement .

SVGLineElement.x1 只读
Returns an SVGAnimatedLength that corresponds to attribute x1 on the given <line> 元素。
SVGLineElement.y1 只读
Returns an SVGAnimatedLength that corresponds to attribute y1 on the given <line> 元素。
SVGLineElement.x2 只读
Returns an SVGAnimatedLength that corresponds to attribute x2 on the given <line> 元素。
SVGLineElement.y2 只读
Returns an SVGAnimatedLength that corresponds to attribute y2 on the given <line> 元素。

方法

This interface doesn't implement any specific methods, but inherits methods from its parent interface, SVGGeometryElement .

规范

规范 状态 Comment
Scalable Vector Graphics (SVG) 2
The definition of 'SVGLineElement' in that specification.
候选推荐 Changed the inheritance from SVGElement to SVGGeometryElement and removed the implemented interfaces SVGTests , SVGLangSpace , SVGExternalResourcesRequired , SVGStylable ,和 SVGTransformable .
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'SVGLineElement' in that specification.
Recommendation 初始定义

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
SVGLineElement Chrome Yes Edge 12 Firefox Yes IE 9 Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
x1 Chrome Yes Edge ≤18 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
x2 Chrome Yes Edge ≤18 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
y1 Chrome Yes Edge ≤18 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
y2 Chrome Yes Edge ≤18 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes

图例

完整支持
完整支持
兼容性未知
兼容性未知

另请参阅

  1. SVGLineElement
  2. 继承:
    1. SVGGeometryElement
    2. SVGGraphicsElement
    3. SVGElement
    4. Element
    5. Node
    6. EventTarget
  3. Related pages for SVG
    1. SVGAElement
    2. SVGAltGlyphElement
    3. SVGAngle
    4. SVGAnimateColorElement
    5. SVGAnimateElement
    6. SVGAnimateMotionElement
    7. SVGAnimateTransformElement
    8. SVGAnimatedAngle
    9. SVGAnimatedBoolean
    10. SVGAnimatedEnumeration
    11. SVGAnimatedInteger
    12. SVGAnimatedLength
    13. SVGAnimatedLengthList
    14. SVGAnimatedNumber
    15. SVGAnimatedNumberList
    16. SVGAnimatedPathData
    17. SVGAnimatedPoints
    18. SVGAnimatedPreserveAspectRatio
    19. SVGAnimatedRect
    20. SVGAnimatedString
    21. SVGAnimatedTransformList
    22. SVGAnimationElement
    23. SVGCircleElement
    24. SVGClipPathElement
    25. SVGComponentTransferFunctionElement
    26. SVGCursorElement
    27. SVGDefsElement
    28. SVGDescElement
    29. SVGDocument
    30. SVGElement
    31. SVGEllipseElement
    32. SVGFEBlendElement
    33. SVGFEColorMatrixElement
    34. SVGFEComponentTransferElement
    35. SVGFECompositeElement
    36. SVGFEConvolveMatrixElement
    37. SVGFEDiffuseLightingElement
    38. SVGFEDisplacementMapElement
    39. SVGFEDistantLightElement
    40. SVGFEDropShadowElement
    41. SVGFEFloodElement
    42. SVGFEFuncAElement
    43. SVGFEFuncBElement
    44. SVGFEFuncGElement
    45. SVGFEFuncRElement
    46. SVGFEGaussianBlurElement
    47. SVGFEImageElement
    48. SVGFEMergeElement
    49. SVGFEMergeNodeElement
    50. SVGFEMorphologyElement
    51. SVGFEOffsetElement
    52. SVGFEPointLightElement
    53. SVGFESpecularLightingElement
    54. SVGFESpotLightElement
    55. SVGFETileElement
    56. SVGFETurbulenceElement
    57. SVGFilterElement
    58. SVGFilterPrimitiveStandardAttributes
    59. SVGFitToViewBox
    60. SVGFontElement
    61. SVGFontFaceElement
    62. SVGFontFaceFormatElement
    63. SVGFontFaceNameElement
    64. SVGFontFaceSrcElement
    65. SVGFontFaceUriElement
    66. SVGForeignObjectElement
    67. SVGGElement
    68. SVGGlyphElement
    69. SVGGradientElement
    70. SVGGraphicsElement
    71. SVGHKernElement
    72. SVGImageElement
    73. SVGLength
    74. SVGLengthList
    75. SVGLinearGradientElement
    76. SVGMPathElement
    77. SVGMarkerElement
    78. SVGMaskElement
    79. SVGMatrix
    80. SVGMetadataElement
    81. SVGMissingGlyphElement
    82. SVGNumber
    83. SVGNumberList
    84. SVGPathElement
    85. SVGPathSeg
    86. SVGPathSegArcAbs
    87. SVGPathSegArcRel
    88. SVGPathSegClosePath
    89. SVGPathSegCurvetoCubicAbs
    90. SVGPathSegCurvetoCubicRel
    91. SVGPathSegCurvetoCubicSmoothAbs
    92. SVGPathSegCurvetoCubicSmoothRel
    93. SVGPathSegCurvetoQuadraticAbs
    94. SVGPathSegCurvetoQuadraticRel
    95. SVGPathSegCurvetoQuadraticSmoothAbs
    96. SVGPathSegCurvetoQuadraticSmoothRel
    97. SVGPathSegLinetoAbs
    98. SVGPathSegLinetoHorizontalAbs
    99. SVGPathSegLinetoHorizontalRel
    100. SVGPathSegLinetoRel
    101. SVGPathSegLinetoVerticalAbs
    102. SVGPathSegLinetoVerticalRel
    103. SVGPathSegList
    104. SVGPathSegMovetoAbs
    105. SVGPathSegMovetoRel
    106. SVGPatternElement
    107. SVGPoint
    108. SVGPointList
    109. SVGPolygonElement
    110. SVGPolylineElement
    111. SVGPreserveAspectRatio
    112. SVGRadialGradientElement
    113. SVGRect
    114. SVGRectElement
    115. SVGSVGElement
    116. SVGScriptElement
    117. SVGSetElement
    118. SVGStopElement
    119. SVGStringList
    120. SVGStylable
    121. SVGStyleElement
    122. SVGSwitchElement
    123. SVGSymbolElement
    124. SVGTRefElement
    125. SVGTSpanElement
    126. SVGTests
    127. SVGTextContentElement
    128. SVGTextElement
    129. SVGTextPathElement
    130. SVGTextPositioningElement
    131. SVGTitleElement
    132. SVGTransform
    133. SVGTransformList
    134. SVGTransformable
    135. SVGURIReference
    136. SVGUnitTypes
    137. SVGUseElement
    138. SVGVKernElement
    139. SVGViewElement
    140. SVGZoomAndPan
    141. SVGZoomEvent
    142. TimeEvent