SVGImageElement
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.
* Some parts of this feature may have varying levels of support.
Giao diện SVGImageElement tương ứng với phần tử <image>.
Thuộc tính phiên bản
Giao diện này cũng kế thừa các thuộc tính từ lớp cha, SVGGraphicsElement.
SVGImageElement.crossOrigin-
Một chuỗi phản ánh thuộc tính nội dung
crossorigin, đại diện cho cài đặt CORS của phần tử<image>đã cho. SVGImageElement.decoding-
Đại diện cho gợi ý được cung cấp cho trình duyệt về cách giải mã hình ảnh.
SVGImageElement.heightRead only-
Một
SVGAnimatedLengthtương ứng với thuộc tínhheightcủa phần tử<image>đã cho. SVGImageElement.hrefRead only-
Một
SVGAnimatedStringtương ứng với thuộc tínhhrefhoặcxlink:hrefDeprecated của phần tử<image>đã cho. SVGImageElement.preserveAspectRatioRead only-
Một
SVGAnimatedPreserveAspectRatiotương ứng với thuộc tínhpreserveAspectRatiocủa phần tử<image>đã cho. SVGImageElement.widthRead only-
Một
SVGAnimatedLengthtương ứng với thuộc tínhwidthcủa phần tử<image>đã cho. SVGImageElement.xRead only-
Một
SVGAnimatedLengthtương ứng với thuộc tínhxcủa phần tử<image>đã cho. SVGImageElement.yRead only-
Một
SVGAnimatedLengthtương ứng với thuộc tínhycủa phần tử<image>đã cho.
Phương thức phiên bản
Giao diện này cũng kế thừa các phương thức từ giao diện cha, SVGGraphicsElement.
SVGImageElement.decode()-
Khởi tạo quá trình giải mã hình ảnh bất đồng bộ. Trả về một
Promiseđược giải quyết khi dữ liệu hình ảnh sẵn sàng để sử dụng.
Thông số kỹ thuật
| Specification |
|---|
| Scalable Vector Graphics (SVG) 2> # InterfaceSVGImageElement> |