SVGLineElement

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Giao diện SVGLineElement cung cấp quyền truy cập vào các thuộc tính của phần tử <line>, cũng như các phương thức để thao tác chúng.

EventTarget Node Element SVGElement SVGGraphicsElement SVGGeometryElement SVGLineElement

Thuộc tính phiên bản

Giao diện này cũng kế thừa thuộc tính từ đối tượng cha, SVGGeometryElement.

SVGLineElement.x1 Read only

Trả về một SVGAnimatedLength tương ứng với thuộc tính x1 của phần tử <line> đã cho.

SVGLineElement.y1 Read only

Trả về một SVGAnimatedLength tương ứng với thuộc tính y1 của phần tử <line> đã cho.

SVGLineElement.x2 Read only

Trả về một SVGAnimatedLength tương ứng với thuộc tính x2 của phần tử <line> đã cho.

SVGLineElement.y2 Read only

Trả về một SVGAnimatedLength tương ứng với thuộc tính y2 của phần tử <line> đã cho.

Phương thức phiên bản

Kế thừa phương thức từ giao diện cha, SVGGeometryElement.

Thông số kỹ thuật

Specification
Scalable Vector Graphics (SVG) 2
# InterfaceSVGLineElement

Tương thích trình duyệt

Xem thêm