1

我正在尝试在 framerjs 中构建标签,它们可以根据文本具有自动宽度。

可以为图层设置自动宽度或最大宽度

4

1 回答 1

1
text = new Layer(backgroundColor: "red")
text.style.width = "auto"
text.style.fontSize = "2em"
text.html = "abcd"

“auto”属性不能在初始化程序(例如,new Layer(width: "auto"))中使用,但可以通过style属性传递。

于 2015-02-22T08:27:13.397 回答