图片展示框组件

注意


此页为于 SCP 维基内部使用的“组件”页。用于在其他页面中引用。

未经组件作者或工作人员允许,请勿修改此页的内容。


评分: +41+x

使用方法

这是一个主要用于艺作页多图片展示的小组件,当然也可以用在别的地方,适配站内绝大多数版式(如果发现不适配的版式,请私信 Dr HormressDr Hormress 反馈!)。此组件的使用非常简单。首先,如任何一个版式一样,在页面的任何地方引入样式:

[[include :scp-wiki-cn:component:frame]]

接着,使用如下的模板创建 [[div]] 元素:

[[div class="frame-container" data-mode="<模式号码>"]]
<图片组件>
[[/div]]

图片组件支持使用标准图片块特色插图width 参数接受值标注为“任何长度单位均可”的选项,你可以使用后者来制作点击全屏或悬停放大的图片。

注意,与你熟悉的这些图片组件的使用方法有所区别,被放置在展示框 [[div]] 内的图片组件 width 参数用于指定其所占据的列数。图片默认占据 1 列宽度,使用

|width=2
|width=3
|width=4

可以使其分别占据 2、3、4 列。在移动端,展示框组件只分两栏,因此 |width=3|width=4 在移动端上表现如同 |width=2

模式号码可填写 1、2、3,对应此组件的 3 种不同模式。

下面是一个实际示例:

test.png

111

silverbird.jpg

111

2026wintercon-banner.jpg

111

scp-logo-int.png

111

test.png

111

silverbird.jpg

111

[[div class="frame-container" data-mode="1"]]
[[include :scp-wiki-cn:component:image-block name=https://scp-wiki.wdfiles.com/local--files/theme:paperstack/test.png
|caption=111]]
[[include :scp-wiki-cn:component:image-block name=https://scp-wiki-cn.wdfiles.com/local--files/fragment:scp-cn-1559-01/silverbird.jpg
|caption=111]]
[[include :scp-wiki-cn:component:image-block name=https://05command-cn.wdfiles.com/local--files/collab%3Aimage-collection/2026wintercon-banner.jpg
|caption=111]]
[[include :scp-wiki-cn:component:image-block name=https://scp-wiki-cn.wdfiles.com/local--files/main/scp-logo-int.png
|caption=111]]
[[include :scp-wiki-cn:component:image-block name=https://scp-wiki.wdfiles.com/local--files/theme:paperstack/test.png
|caption=111
|width=2]]
[[include :scp-wiki-cn:component:image-block name=https://scp-wiki-cn.wdfiles.com/local--files/fragment:scp-cn-1559-01/silverbird.jpg
|caption=111
|width=2]]
[[/div]]


模式说明

模式 1

此模式将使图片组件顶端对齐,不自动拉伸。适用于图片和文本比较错落的场合。

test.png

111

silverbird.jpg

111

2026wintercon-banner.jpg

111

scp-logo-int.png

111

模式 2

此模式将使图片组件上下对齐,且图片介绍文本拉伸。适用于图片高度统一,而介绍文本长度有所差异的场合。

test.png

111

silverbird.jpg

111

2026wintercon-banner.jpg

111

scp-logo-int.png

111

模式 3

此模式将使图片组件上下对齐,且图片置于中间。适用于图片高度不统一,而介绍文本长度基本一致的场合。

test.png

111

silverbird.jpg

111

2026wintercon-banner.jpg

111

scp-logo-int.png

111

除非特别注明,本页内容采用以下授权方式: Creative Commons Attribution-ShareAlike 3.0 License