模板:RunningHeader

維基文庫,自由的圖書館
跳到导航 跳到搜索
文档图示 模板文档[查看] [编辑] [历史] [清除缓存]


用法[编辑]

本模板让贡献者在录入文本的时候,简单输入页眉标题(亦可用于他处)。许多文本都使用页眉标题以左中右的排版注明章数、页数等信息。

三个元素的页眉标题(左中右)[编辑]

大部分页眉标题都有左中右三部分。如果使用模板时,含有少于四个参数,参数将在页眉标题的左中右方显示。

当模板没有注明参数的位置,内容将以左、中、右的排序显示,譬如:

{{RunningHeader|左边|中间|右边}}

左边

中间

右边

使用模板时亦可以注明参数的位置,譬如:

{{RunningHeader|left=左边|right=右边|center=中间}}

左边

中间

右边

四个元素的页眉标题(左、左中、右中、右)[编辑]

某些作品使用有四个元素的页眉标题,内容的排序为:左、左中、右中、右。

{{RunningHeader|左边|左中|右中|右边}}

左边

左中

右中

右边

如第四个参数没有内容,页眉标题依然会以四元素模式呈现:

{{RunningHeader|左边|左中|右中|}}

左边

左中

右中

Page styles[编辑]

This template adds the class wst-running-header (搜索含有.wst-running-header的CSS档) to the outer container.

You can target the "cells" of the header with CSS like .wst-running-header-cell:nth-child(n), where n is 1, 2 or 3 (or 4, for a 4-cell header).

Additional parameter: style[编辑]

Where there is a need to specify the style of the text, an optional "style" parameter can be used. This parameter takes the same style attributes that can be set for any <div> element in the 3-part headers case or table row in the 4-part headers case.

{{RunningHeader|style=font-size:110%; font-style:italic|left|left-centre|right-centre|right}}

left

left-centre

right-centre

right

If a style is repeated for all headers in a book, prefer the CSS method.

Redirects[编辑]

{{Running header}} and {{rh}} redirect here. Use these forms of the template if you prefer.