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