Template: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!!