DOMPoint.y

DOMPoint 的 y 属性表示该点的垂直坐标。y 值增加表示向下偏移,减小表示向上偏移,除非改变了默认轴方向。

语法

var yPos = DOMPoint.y;

双精度浮点值,表示该点的 y 坐标值。这个值的类型并没有严格限制,意味着它可以是 NaN±Infinity

规范

Specification Status Comment
Geometry Interfaces Module Level 1
y
Candidate Recommendation Initial definition

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
yChrome Full support 61Edge Full support 79Firefox Full support 31IE No support NoOpera Full support 48Safari Full support 10.1WebView Android Full support 61Chrome Android Full support 61Firefox Android Full support 31Opera Android Full support 45Safari iOS Full support 10.3Samsung Internet Android Full support 8.0

Legend

Full support  
Full support
No support  
No support

相关链接

  • 其他坐标属性: x, z, 透视值 w