SVGFilterElement: y property
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.
Thuộc tính chỉ đọc y của giao diện SVGFilterElement mô tả tọa độ dọc của vị trí bộ lọc SVG dưới dạng SVGAnimatedLength.
Nó phản ánh thuộc tính y của phần tử <filter>. Thuộc tính là một <length> hoặc <percentage>. <coordinate> là độ dài trong hệ tọa độ người dùng, bằng khoảng cách từ gốc của bộ lọc theo trục y. Nếu thuộc tính y là giá trị phần trăm, giá trị thuộc tính tương đối so với chiều cao của vùng bộ lọc theo đơn vị hệ tọa độ người dùng. Giá trị mặc định là 0.
Giá trị
Một SVGAnimatedLength.
Ví dụ
js
const filter = document.querySelector("filter");
const topPosition = filter.y;
console.log(topPosition.baseVal.value); // giá trị `y`
Thông số kỹ thuật
| Specification |
|---|
| Filter Effects Module Level 1> # dom-svgfilterelement-y> |
Tương thích trình duyệt
Xem thêm
- SVG tutorial: Filter effects
- SVG Filter primitive attributes
- CSS
<blend-mode>data type - CSS
mix-blend-modeproperty