【翻譯svg教程 】svg 的座標系統

http://tutorials.jenkov.com/svg/svg-coordinate-system.htmlhtml

svg的座標系統(和大多數計算機繪圖的座標系統)和數學中繪圖系統有點不同svg

數學/笛卡兒座標系統

數學中的座標系統是這樣的spa

QQ截圖20141214105856

原點在左下角code

SVG座標系統

QQ截圖20141214110055

svg的座標系統 原點在左上角htm

SVG 座標系統的單位

你能夠指定在SVG座標系單位。你處處均可以指定一個座標(x和y位置,寬度和高度等)。您指定的單位價後,例如10釐米或125毫米。blog

若是不指定任何單位協調值後,單位被認爲是像素(px)。ci

svg 單位列表get

em 默認高度,一般是行高 The default font size - usually the height of a character.
ex 一個字母x的高度? The height of the character x
px 像素 最經常使用的
pt Points (1 / 72 of an inch)
pc Picas (1 / 6 of an inch)
cm Centimeters
mm Millimeters
in Inches

通常用 em 和 px 比較多數學

相關文章
相關標籤/搜索