本文介绍了Svg getComputedTextLength函数总是返回零的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我试图从

但 c> this.getComputedTextLength其父容器在文本时将显示设置为 none c>元素。

I realize that this is over a year late, but I ran into the same issue recently and this may help someone. this.getComputedTextLength() returns 0 if the text element hasn't been rendered yet or if the container or any of its parent containers have display set to none at the time the text element is being rendered.

这篇关于Svg getComputedTextLength函数总是返回零的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 00:09