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.
我正在尝试在 framerjs 中构建标签,它们可以根据文本具有自动宽度。
可以为图层设置自动宽度或最大宽度
text = new Layer(backgroundColor: "red") text.style.width = "auto" text.style.fontSize = "2em" text.html = "abcd"
“auto”属性不能在初始化程序(例如,new Layer(width: "auto"))中使用,但可以通过style属性传递。
new Layer(width: "auto")
style