Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试更改 raphael 元素的 bbox 数据,但它不起作用。
我尝试设置
textElement.attr("text","1");
但它看起来像保持最新最宽的文本宽度,我假设将 bbox 值缩小为更小的文本。
显然我错过了一些东西。
Raphael 不会让您对元素的边界框进行任何控制。字体元素的边界框限于文本的宽度。如果要更改字体大小,只需使用font-size属性:
font-size
textElement.attr("font-size","12");