模板:Flex

出自Noita Wiki
跳至導覽 跳至搜尋
Template-info.png 模板文檔

Usage

{{flex/start}}
some stuff
{{flex/end}}

<!-- OR (optionally allow floating or adjust vertical alignment) -->

{{flex/start | float=right | align=start}}
some stuff
{{flex/end}}

Details

A flexible container to dynamically align elements based on available width.

模板參數

此模板以參數區塊格式為優先。

參數描述類型狀態
contentcontent1

The content to put in the flex container. Can also be passed as the first positional (nameless) parameter.

內容建議

Example

{{flex/start}}
<div style="border: 1px solid;">there's a box here</div>
<div style="border: 1px solid;">and another!!</div>
<div style="border: 1px solid;">all spread out or something</div>
<div style="border: 1px solid;">who knows really</div>
{{flex/end}}


there's a box here
and another!!
all spread out or something
who knows really
Floating flex containers!
{{flex/start | float=right}}
<div style="border: 1px solid;">there's a box here</div>
<div style="border: 1px solid;">and another!!</div>
<div style="border: 1px solid;">all spread out or something</div>
<div style="border: 1px solid;">who knows really</div>
{{flex/end}}
there's a box here
and another!!
all spread out or something
who knows really

The following syntax is generally considered legacy but still supported; when possible, use the /start and /end fragments, as it makes things a little nicer to edit and makes syntax highlighting less screwy.

{{flex
| content = 
<div style="border: 1px solid;">there's a box here</div>
<div style="border: 1px solid;">and another!!</div>
}}
there's a box here
and another!!