仅想知道HTML/SVG在浏览器中将0,0表示为左上角是什么原因?有什么好处吗?
与传统观点(经典几何学)相反,Y值在屏幕上越低,其值就越大.
解决方案因为早于SVG的CSS的工作原理.
在大多数情况下,例如独立的SVG文档或嵌入(通过引用或内联)在XML父文档中的SVG文档片段,其中父文档的布局由CSS [CSS2]或XSL [XSL]确定,初始视口坐标系(因此也就是初始用户坐标系)的原点位于视口的顶部/左侧,正x轴指向右侧,正y轴指向下方,
Just wondering whats the reasoning behind saying 0,0 as top left corner in browser by both HTML/SVG? Are there any advantage to this?
It goes against conventional wisdom (classic geometry) that the Y values become greater in value the lower they are on the screen.
解决方案Because that's how CSS which predates SVG works.
In most cases, such as stand-alone SVG documents or SVG document fragments embedded (by reference or inline) within XML parent documents where the parent's layout is determined by CSS [CSS2] or XSL [XSL], the initial viewport coordinate system (and therefore the initial user coordinate system) has its origin at the top/left of the viewport, with the positive x-axis pointing towards the right, the positive y-axis pointing down,
更多推荐
为什么HTML/SVG坐标0,0从左上角开始?
发布评论