如何在鞋子的流槽中实现垂直对齐?
flow
槽中的默认垂直对齐方式显然是对元素进行顶部对齐。 这是一个示例:
Shoes.app (:title => "Vertical Alignment", :width => 300, :height => 150) do
background "#DFA"
flow :margin => 30 do
title "BIG"
tagline "MEDIUM"
inscription "SMALL"
end
end
如何让 flow
插槽将其元素居中对齐,而不计算每个元素的 :rise
值? 我本来期望 flow
插槽有垂直对齐样式,而 stack
插槽有水平对齐样式,但我没有看到类似的东西。 我错过了什么?
The default vertical alignment in a flow
slot is apparently to top-align the elements. Here's a sample:
Shoes.app (:title => "Vertical Alignment", :width => 300, :height => 150) do
background "#DFA"
flow :margin => 30 do
title "BIG"
tagline "MEDIUM"
inscription "SMALL"
end
end
How do I get the flow
slot to center-align its elements short of calculating a :rise
value for each element? I would have expected a vertical-alignment style for flow
slots and a horizontal-alignment style for stack
slots, but I don't see anything like that. What did I miss?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,没有垂直对齐的样式。 水平对齐在堆栈中很有用:
请记住,Shoes 仍然是一项正在进行中的工作,因此 _why 最终可能会解决它。
To my knowledge, there's no style for vertical alignment. There is horizontal alignment which is useful in stacks:
Keep in mind that Shoes is very much still a work in progress, so _why will probably get around to it eventually.