Template:Flex/doc

来自Noita Wiki
跳转到导航 跳转到搜索
Template-info.svg 模板文档

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.

模板参数

此模板首选参数换行的代码块格式。

参数描述类型状态
contentcontent 1

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