跳至內容

模板: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.