作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 Ruby 中的 Shoes 工具包创建一个 GUI 应用程序,并使用 require 'green_shoes'
gem。
元素正在进行中,但我在将按钮居中对齐时遇到了问题有人知道怎么做吗?我有一个示例代码:
Shoes.app width:500, height: 400 do
stack do
para "input here"
button button1
@content = edit_line
end
end
最佳答案
您可以使用:左、右、上和下。我不确定是否居中,但您可以以像素为单位给出 x、y 坐标。
stack(left: 35, top: 90) do
para "input here"
button button1
@content = edit_line
end
这也是一个很好的演练:http://shoesrb.com/walkthrough/
关于css - 如何在 Ruby 中对齐 Shoes GUI Toolkit 中的按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47892359/
我是一名优秀的程序员,十分优秀!