跳转到内容

模板:Right/doc

维基文库,自由的图书馆

用法

[编辑]

本模板将文字置于右方。

{{right|'''字句'''}}

显示为

字句


第二参数或offset参数可增加文字右边边界的大小:

{{right|'''字句'''|3em}}

{{right|'''字句'''|offset=3em}}

均显示为

字句


{{right}}还是{{float right}}?

[编辑]

This template, {{right}}, retains the text in the normal flow, but causes it to be aligned along the right margin. {{float right}} takes a block of text out of the normal text flow, and floats it as far right as possible, without changing how it is aligned; other text can flow around it, as if it were a picture or diagram.

{{right}} {{float right}}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.

本句
使用{{right}}
置于页面右边。

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.

本句
使用{{float right}}
置于页面右边。

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.

TemplateData

[编辑]
这是用于新版可视化编辑器及其他工具的模板数据文档。

Right模板数据

Align text to the right.

模板参数

此模板首选参数不换行的行内格式。

参数描述类型状态
Text1

The text to right-align.

内容必需
Offsetoffset 2

The right margin.

默认值
0
示例值
3em
字符串推荐
Top leading/paddingleading-top

The space to leave at the top of the aligned block. Value in ems (do not specify units).

默认值
0
示例值
2
字符串推荐
Stylestyle

Any other CSS rules to apply to the block.

字符串可选

参见

[编辑]
  • {{Left}}: 将文字置左
  • {{Block right}}: places a block of text in the right of the page, without affecting the text alignment within that block.