只读
alphabeticBaseline
特性为
TextMetrics
接口是
double
giving the distance from the horizontal line indicated by the
CanvasRenderingContext2D.textBaseline
property to the alphabetic baseline of the line box, in CSS pixels.
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
const text = ctx.measureText('foo'); // returns TextMetrics object
text.alphabeticBaseline; // -0;
| 规范 |
|---|
|
HTML 实时标准
The definition of 'TextMetrics.alphabeticBaseline' in that specification. |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
alphabeticBaseline
|
Chrome
Yes
Disabled
|
Edge
79
Disabled
|
Firefox 74 | IE No | Opera ? | Safari Yes | WebView Android No |
Chrome Android
Yes
Disabled
|
Firefox Android No | Opera Android ? | Safari iOS Yes | Samsung Internet Android No |
完整支持
不支持
兼容性未知
实验。期望将来行为有所改变。
用户必须明确启用此特征。