The 'X' property - Web APIs 编辑
The x property describes the horizontal coordinate of the position of the element.
Usage context
Name | x |
Value | <length> | <percentage> |
Initial | 0 |
Applies to | <mask> , ‘svg’, ‘rect’, ‘image’, ‘foreignObject’ |
Inherited | no |
Percentages | refer to the size of the current viewport (see Units) |
Media | visual |
Computed value | absolute length or percentage |
Animatable | yes |
Simple usage
A <coordinate> is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the relevant axis (the x-axis for X coordinates, the y-axis for Y coordinates). Its syntax is the same as that for <length>
// Rect draws a rectangle with upper left-hand corner at x,y, with width w, and height h, with optional style // Standard Reference: http://www.w3.org/TR/SVG11/shapes.html#RectElement func (svg *SVG) Rect(x float64, y float64, w float64, h float64, s ...string) { svg.printf(`<rect %s %s`, dim(x, y, w, h, svg.Decimals), endstyle(s, emptyclose)) }
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论