Baseline Widely available
getComputedTextLength()
㯠SVGTextContentElement
ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®ã¡ã½ããã§ããã®è¦ç´ å
ã®ããã¹ãã®è¨ç®ãããé·ãã表ãã¾ãã
ãªãã
è¿å¤å®æ°ã§ãã
ä¾ ããã¹ãã®é·ãã®è¨ç®<svg width="300" height="100">
<text id="exampleText" x="10" y="50" font-size="16">Hello, SVG World!</text>
</svg>
const textElement = document.getElementById("exampleText");
// è¨ç®ãããããã¹ãã®é·ããåå¾
const textLength = textElement.getComputedTextLength();
console.log(textLength); // åºå: 124.5 ï¼ä¾ããã©ã³ããµã¤ãºãããã¹ãã³ã³ãã³ãã«ãã£ã¦å¤ããï¼
仿§æ¸ ãã©ã¦ã¶ã¼ã®äºææ§
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4