大虾- Rails 5.2 将两段文字放在同一行的两边
Prawn - Rails 5.2 Put two bits of text on the same line but at either side
我一直在尝试复制以下示例中的文本样式:
但我一直没能找到将两个文本元素放在同一行的方法。
Prawn 可以吗?如果可以,怎么做呢?
你可以使用 prawn-table,你的图像看起来像 table 有 2 列。
https://github.com/prawnpdf/prawn-table
table([
["Base Price", "5,99],
["Canary Cozy Sound Isolation Blankey", ".00"]
])
当然,您将不得不尝试使用 table 的样式来删除边框、对齐第二列的单元格等。
我一直在尝试复制以下示例中的文本样式:
但我一直没能找到将两个文本元素放在同一行的方法。
Prawn 可以吗?如果可以,怎么做呢?
你可以使用 prawn-table,你的图像看起来像 table 有 2 列。
https://github.com/prawnpdf/prawn-table
table([
["Base Price", "5,99],
["Canary Cozy Sound Isolation Blankey", ".00"]
])
当然,您将不得不尝试使用 table 的样式来删除边框、对齐第二列的单元格等。