> ## Documentation Index
> Fetch the complete documentation index at: https://foliant-help.iforiti.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 设置区块的样式和位置

> 设置区块的对齐、内边距、背景、边框、宽度和间距，并控制区块前后的分页位置。

每个区块在页面上都有自己的外观和位置，您可以在检查器的 **样式** 选项卡中设置。字体和颜色不按区块单独设置，而是来自整个单据的样式。请参阅[单据样式](https://foliant-help.iforiti.com/cn/template-editor/document-styles.md)。

## 更改区块样式

1. 在页面上选择区块。
2. 在检查器中，打开 **样式**。
3. 设置以下任意一项：

| 设置 | 选项 |
| - | - |
| **对齐** | **左对齐**、**居中**、**右对齐** |
| **内边距** | **紧凑**、**标准**、**宽松** |
| **背景** | **无**、**浅色**（强调色的浅色调）、**强调色带** |
| **边框** | **无**、**顶部线条**、**方框** |
| **宽度** | **全宽**、**适应内容**，或 25%、33%、50%、66% 或 75% **页面宽度**。区块比页面窄时，由其对齐方式决定它在行中的位置。 |
| **上方间距** / **下方间距** | 0–30 毫米。留空（**自动**）则遵循单据的疏密设置。您也可以在页面上拖动所选区块上方和下方的间距手柄。 |

点击 **编辑单据样式**，可更改整个单据的字体和颜色。

## 选择区块的打印位置

同样在 **样式** 选项卡中：

* **打印位置**：**页眉**、**正文** 或 **页脚**。页眉和页脚中的区块会在每一页重复。请参阅[页眉和页脚](https://foliant-help.iforiti.com/cn/template-editor/page-header-and-footer.md)。随订单内容增长的区块（商品表格、合计、税费汇总、分页符、订单表格和拣货行）只能打印在正文中。
* **从新页开始**：该区块总是从新的一页开始。
* **与下一个区块保持在一起**：页面不会在该区块之后立即结束。您可以用它让标题与后面的内容保持在一起。

这些分页选项适用于正文中的区块。

## 将样式复制到其他区块

1. 在页面上打开该区块的手柄菜单，选择 **复制样式**。
2. 打开另一个区块的菜单，选择 **粘贴样式**。

对齐、内边距、背景、边框、宽度和间距都会被复制。复制的样式在您工作期间一直可用，因此您也可以将其粘贴到其他模板中。

## 注意事项

* 新的 **合计** 区块默认右对齐，新的 **法律信息页脚** 区块默认带有顶部线条；这两项您都可以更改。
* 共享版块的外观与其已保存区块一致。在每个模板中只能设置它的宽度和间距。请参阅[已保存区块和共享版块](https://foliant-help.iforiti.com/cn/template-editor/saved-blocks-and-shared-sections.md)。
* 页面上显示的是预览订单的大致分页位置。**预览 PDF** 会显示确切的页面。请参阅[预览、纸张尺寸和缩放](https://foliant-help.iforiti.com/cn/template-editor/preview-paper-and-zoom.md)。

## 相关文章

* [单据样式](https://foliant-help.iforiti.com/cn/template-editor/document-styles.md)
* [页眉和页脚](https://foliant-help.iforiti.com/cn/template-editor/page-header-and-footer.md)
* [添加、移动和删除区块](https://foliant-help.iforiti.com/cn/template-editor/add-and-arrange-blocks.md)
* [预览、纸张尺寸和缩放](https://foliant-help.iforiti.com/cn/template-editor/preview-paper-and-zoom.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.