将表单置于 HubSpot 模板的中心位置
上次更新时间: 二月 12, 2025
除非另有说明,否则适用于以下任何订阅:
|
|
旧版 Marketing Hub Basic |
您可以使用水平间隔模块或自定义 CSS 在 HubSpot 模板上将表单居中。
使用水平间隔模块
- 在 HubSpot 帐户中,导航到内容 > 设计管理器。
- 点击查找器中的模板名称进行编辑。
- 在右侧的检查器中,点击+ 添加,插入两个新的水平间隔模块;一个在表单模块的左侧,另一个在表单模块的右侧。
使用自定义 CSS
/* To center the form within its module and applying a max-width */ form.hs-form, .hs_cos_wrapper .form-title { max-width: 600px; display: block; margin: 0 auto; } /* To center the form title within a form module */ .hs_cos_wrapper .form-title { text-align: center; } /* To center the form submit button */ .hs_submit { text-align: center; }
/* To center the form within its module and applying a max-width */ form.hs-form, .center-form .hs_cos_wrapper .form-title { max-width: 600px; display: block; margin: 0 auto; } /* To center the form title within a form module */ .center-form .hs_cos_wrapper .form-title { text-align: center; } /* To center the form submit button */ .center-form .hs_submit { text-align: center; }
- 在右上角单击 "发布更改"。
Design Manager
你的反馈对我们至关重要,谢谢。
此表单仅供记载反馈。了解如何获取 HubSpot 帮助。