SVG <line>


Release date:2023-12-07 Update date:2023-12-07 Editor:admin View counts:79

Label:

SVG <line>

SVG straight line- <line>

<line> Element is used to create a straight line:

Here is the SVG code:

Example

<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
  <line x1="0" y1="0" x2="200" y2="200"
  style="stroke:rgb(255,0,0);stroke-width:2"/>
</svg>

For Opera users: view the SVG file (right-click the SVG drawing preview source).

  • The X1 property defines the beginning of the line on the x-axis

  • The Y1 property defines the beginning of the line on the y-axis

  • The x2 property defines the end of the line on the x-axis.

  • The Y2 property defines the end of the line on the y-axis.

Powered by TorCMS (https://github.com/bukun/TorCMS).