模板:Right

維基文庫,自由的圖書館
跳到导航 跳到搜索

{{{1}}}

文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

用法[编辑]

本模板将文字置于右方。

{{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[编辑]

这是用于新版zh-cn:可视化编辑器;zh-tw:視覺化編輯器;及其他工具的zh-cn:模板数据;zh-tw:模板資料zh-cn:文档;zh-tw:文件;。

Rightzh-cn:模板数据;zh-tw:模板資料

Align text to the right.

模板参数

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

参数描述类型状态
Text1

The text to right-align.

内容必填
Offsetoffset2

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.