imported>=海豚= |
imported>=海豚= |
第1行: |
第1行: |
| /*
| |
| * 放置于这里的CSS将应用于所有皮肤
| |
| * 请尊重版权,以下代码除非注明均是管理员手敲出来的!!!复制需要注明源自H萌娘,并且附上URL地址http://www.hmoegirl.com/MediaWiki:Common.css
| |
| * 版权协定:知识共享 署名-非商业性使用-相同方式共享 3.0
| |
| * 复制之后请把图片换成自己网站上URL地址!
| |
| */
| |
| /*
| |
| * vector界面、主标题字体定制,参考Github添加了Emoji支持
| |
| * 更改后要同步到 [[MediaWiki:Gadget-GothicMoe.css]]
| |
| */
| |
| body {
| |
| font-size: 110%;
| |
| }
| |
|
| |
|
| /*懒加载渐入*/
| | == 简介 == |
| .lazyload,
| |
| .lazyloading {
| |
| opacity: 0;
| |
| }
| |
|
| |
|
| .lazyloaded {
| | 这是 一 个模拟数组形式生成结构化 数 据 的 模板 , 可 以 进行 大 量 的 存储、操作或传输 数据 ,[[# 在Lua中获取或构造|与lua通信]]。本质 上 就是一次声明多个命名有关联 的变 量。 |
| opacity: 1;
| |
| transition: opacity 300ms;
| |
| }
| |
| /* 侧边栏、顶部栏 */
| |
| div#mw-page-base {
| |
| height: 104px;
| |
| }
| |
| #left-navigation,
| |
| #right-navigation {
| |
| margin-top: 60px;
| |
| }
| |
| div#mw-head div.vectorMenu h4 {
| |
| height: 1.9em;
| |
| margin-bottom: 0;
| |
| padding-top: 1.25em;
| |
| padding-bottom: 0;
| |
| padding-right: 0.5em;
| |
| }
| |
| div#mw-panel div.portal {
| |
| padding-bottom: 0.7em;
| |
| padding-top: 0.4em;
| |
| }
| |
| #mw-panel #p-logo {
| |
| width: 170px;
| |
| margin-left: -0.05em;
| |
| padding-top: 0.3em;
| |
| }
| |
| #mw-panel #p-logo .mw-wiki-logo {
| |
| width: 175px;
| |
| }
| |
| div#mw-panel {
| |
| font-size: 20px;
| |
| /* mw-panel的宽度是10em,改了font-size以后也需要修改 一 下 */
| |
| width: 11.6rem;
| |
| margin-left: -0.1em;
| |
| }
| |
| .clear-div {
| |
| clear: both;
| |
| }
| |
| /* 标题字型调整*/
| |
| #firstHeading {
| |
| font-family: sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
| |
| font-weight: 500;
| |
| font-size: 175%;
| |
| }
| |
| h1 {
| |
| font-size: 100%;
| |
| }
| |
| h2 {
| |
| font-size: 100%;
| |
| }
| |
| .mw-content-ltr h3,.mw-content-ltr h4{
| |
| padding-left: 0.25em;
| |
| border-left: 15px solid #DDEEFF;
| |
| color:inherit;
| |
| padding:.15em;
| |
| }
| |
| /* 副标题 */
| |
| #siteSub {
| |
| display: inline;
| |
| font-size: 90%;
| |
| font-weight: 400; /* 400 = normal */
| |
| font-style: normal;
| |
| text-align: right;
| |
| }
| |
| /* 右上通知处奇怪的 数 字移除 */
| |
| #pt-notifications-alert .mw-echo-notifications-badge,
| |
| #pt-notifications-notice .mw-echo-notifications-badge {
| |
| text-indent: -99999px;
| |
| }
| |
| #pt-notifications-alert .mw-echo-notifications-badge:after,
| |
| #pt-notifications-notice .mw-echo-notifications-badge:after {
| |
| text-indent: 0;
| |
| }
| |
| /* 被点过 的 外部链接不变色。采取和默认皮肤相同写法 ,以 便override */
| |
| .mw-body a.external:visited {
| |
| color: #36b;
| |
| }
| |
| /* 斜体字右边距加 大 看以防止文字挤在一起 */
| |
| #mw-content-text i {
| |
| margin-right: 3px;
| |
| }
| |
| /* Extension:MultimediaViewer 的 半透明化修改 */
| |
| .mw-mmv-overlay {
| |
| position: fixed;
| |
| top: 0;
| |
| left: 0;
| |
| right: 0;
| |
| bottom: 0;
| |
| background-color: rgba(0,0,0,0.8);
| |
| opacity: 0.73;
| |
| }
| |
| body.mediawiki.mw-mmv-lightbox-open #mw-page-base,
| |
| body.mediawiki.mw-mmv-lightbox-open #mw-head-base,
| |
| body.mediawiki.mw-mmv-lightbox-open #mw-navigation,
| |
| body.mediawiki.mw-mmv-lightbox-open #content,
| |
| body.mediawiki.mw-mmv-lightbox-open #footer,
| |
| body.mediawiki.mw-mmv-lightbox-open #globalWrapper {
| |
| display: inherit;
| |
| }
| |
| body.mediawiki.mw-mmv-lightbox-open > * {
| |
| display: inherit;
| |
| }
| |
| body.mediawiki.mw-mmv-lightbox-open > script,
| |
| body.mediawiki.mw-mmv-lightbox-open > style {
| |
| display: none;
| |
| }
| |
| body.mediawiki.mw-mmv-lightbox-open {
| |
| overflow: hidden;
| |
| }
| |
| body .mw-mmv-wrapper {
| |
| position: fixed;
| |
| }
| |
| /* mutilmediaViewer 信息栏修复 */
| |
| .mw-mmv-image-metadata-column.mw-mmv-image-metadata-desc-column {
| |
| width: 30%;
| |
| }
| |
| .mw-mmv-image-metadata-column.mw-mmv-image-metadata-links-column {
| |
| width: 70%;
| |
| max-width: 70%;
| |
| }
| |
| ul.mw-mmv-image-links li {
| |
| float: left;
| |
| padding: .3em 1em;
| |
| }
| |
| div.mw-mmv-image-desc-div,
| |
| div.mw-mmv-image-links-div{
| |
| display:block
| |
| }
| |
| div.metadata-panel-is-closed .mw-mmv-image-links li.mw-mmv-license-li {
| |
| height:inherit;
| |
| line-height:inherit;
| |
| }
| |
| /* 通用圆角框 */
| |
| .common-box {
| |
| padding: .2em .4em;
| |
| border: 1px solid #ddd;
| |
| -moz-border-radius: 10px;
| |
| -webkit-border-radius: 10px;
| |
| -khtml-border-radius: 10px;
| |
| -o-border-radius: 10px;
| |
| -webkit-box-shadow: #666 0 2px 3px;
| |
| -moz-box-shadow: #666 0 2px 3px;
| |
| border-radius: 10px;
| |
| box-shadow: #666 0 2px 3px;
| |
| }
| |
| /* 数据 表格 */
| |
| .mw-datatable.TablePager {
| |
| width: 100%;
| |
| table-layout: fixed;
| |
| word-wrap: break-word;
| |
| }
| |
| /* 隐藏首页标题、空行、分类、讨论、查看源代码tab */
| |
| .page-Mainpage h1.firstHeading,
| |
| .page-Mainpage #siteSub,
| |
| .page-Mainpage #contentSub,
| |
| .page-Mainpage #ca-viewsource,
| |
| .page-Mainpage #siteNotice,
| |
| .page-Mainpage #ca-talk,
| |
| .page-Mainpage #catlinks {
| |
| display: none;
| |
| }
| |
| /* 黑幕模板配合CSS */
| |
| /* 把这几行单独拎出来写,否则会被Firefox合并到“.heimu a”这条规则,然后又被 上 面 的 “点过外链不 变 色”规则override */
| |
| span.heimu a.external,
| |
| span.heimu a.external:visited,
| |
| span.heimu a.extiw,
| |
| span.heimu a.extiw:visited {
| |
| color: #252525;
| |
| }
| |
| .heimu,
| |
| .heimu a,
| |
| a .heimu,
| |
| .heimu a.new {
| |
| background-color: #252525;
| |
| color: #252525;
| |
| text-shadow: none;
| |
| }
| |
| body:not(.heimu_toggle_on) .heimu:hover,
| |
| body:not(.heimu_toggle_on) .heimu:active,
| |
| body:not(.heimu_toggle_on) .heimu.off {
| |
| transition: color .13s linear;
| |
| color: white;
| |
| }
| |
| body:not(.heimu_toggle_on) .heimu:hover a,
| |
| body:not(.heimu_toggle_on) a:hover .heimu,
| |
| body:not(.heimu_toggle_on) .heimu.off a,
| |
| body:not(.heimu_toggle_on) a:hover .heimu.off {
| |
| transition: color .13s linear;
| |
| color: lightblue;
| |
| }
| |
| body:not(.heimu_toggle_on) .heimu.off .new,
| |
| body:not(.heimu_toggle_on) .heimu.off .new:hover,
| |
| body:not(.heimu_toggle_on) .new:hover .heimu.off,
| |
| body:not(.heimu_toggle_on) .heimu.off .new,
| |
| body:not(.heimu_toggle_on) .heimu.off .new:hover,
| |
| body:not(.heimu_toggle_on) .new:hover .heimu.off {
| |
| transition: color .13s linear;
| |
| color: #BA0000;
| |
| }
| |
| /* 目录样式 */
| |
| #toc{
| |
| padding: 0.8em;
| |
| box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.12);
| |
| border-radius: 10px;
| |
| overflow: hidden;
| |
| border: 1px solid #ddd;
| |
| background: rgba(250,250,250,0.8);
| |
| }
| |
| /* 导航条(完全没有apple风格的apple风面包屑orz) 来源:http://www.jankoatwarpspeed.com/examples/breadcrumb/ */
| |
| #breadcrumb {
| |
| background-image: url(//img.moegirl.org/breadcrumb/bc_bg.png);
| |
| color: red;
| |
| border: solid 1px #cacaca;
| |
| border-radius: 10px;
| |
| overflow: hidden;
| |
| }
| |
| #breadcrumb span {
| |
| float: left;
| |
| padding-left: 10px;
| |
| }
| |
| #breadcrumb a {
| |
| display: block;
| |
| background: url(//img.moegirl.org/breadcrumb/bc_separator.png) no-repeat right;
| |
| padding-right: 15px;
| |
| color: #454545;
| |
| }
| |
| #breadcrumb a:hover {
| |
| color: #35acc5;
| |
| }
| |
| /* info类模板 */
| |
| .infobox {
| |
| margin:0 auto;
| |
| }
| |
| .infobox1 {
| |
| margin:0 auto;
| |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.10);
| |
| border-radius: 5px;
| |
| overflow: hidden;
| |
| border: 0.5px solid #ddd;
| |
| }
| |
| .infobox2 {
| |
| margin-top: 0.4em ;
| |
| margin-left: 1em;
| |
| padding: 0.2em;
| |
| float: right;
| |
| clear: right;
| |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
| |
| border-radius: 4px;
| |
| overflow: hidden;
| |
| background: rgba(251,251,251,0.8);
| |
| }
| |
| .infobox3 {
| |
| margin:0 auto;
| |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.10);
| |
| border-radius: 15px;
| |
| overflow: hidden;
| |
| }
| |
| .infoBoxTitle {
| |
| margin: 3px auto;
| |
| padding: 0;
| |
| text-align: center;
| |
| font-weight: 700;
| |
| }
| |
| .infoBoxIcon {
| |
| display: table-cell;
| |
| padding: 2px 0 2px .5em;
| |
| vertical-align: middle;
| |
| }
| |
| .infoBoxText {
| |
| display: table-cell;
| |
| padding: .25em .5em .25em 1.3em;
| |
| width: 100%;
| |
| vertical-align: middle;
| |
| }
| |
| .infoBoxContent {
| |
| padding: 0.6em;
| |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
| |
| border-radius: 5px;
| |
| overflow: hidden;
| |
| border: 1px solid #ddd;
| |
| background: rgba(251,251,251,0.7);
| |
| }
| |
| .infoBoxBelow {
| |
| margin: 0 auto;
| |
| padding: 0;
| |
| text-align: center;
| |
| }
| |
| .infoBoxYellow {
| |
| padding: 0.5em;
| |
| background: rgba(255,255,245,0.8);
| |
| }
| |
| .infoBoxRed {
| |
| padding: 0.5em;
| |
| background: rgba(258,240,245,0.8);
| |
| }
| |
| .infoBoxBlue {
| |
| padding: 0.4em;
| |
| background: rgba(240,248,255,0.8);
| |
| }
| |
| .infoBoxPurple {
| |
| padding: 0.4em;
| |
| background: rgba(248,248,255,0.8);
| |
| }
| |
| .infoBoxGreen {
| |
| padding: 0.5em;
| |
| background: rgba(245,255,250,0.8);
| |
| }
| |
| .infoBoxOrange {
| |
| padding: 0.5em;
| |
| background: rgba(250,240,230,0.8);
| |
| }
| |
|
| |
|
| /*热门评论*/
| | 因为未使用字符串处理,相对于使用字符串处理来分割参数的做法可以更安全地存储或传递数据。 |
| .comment-container-top>div:not(.comment-thread) {
| |
| background-color: rgba(244, 196, 48, 0.8) !important;
| |
| color: white !important;
| |
| font-weight: bolder !important;
| |
| }
| |
|
| |
|
| .comment-thread.comment-popular {
| | == 用法 == |
| background-color: rgba(244, 196, 48, 0.05) !important;
| | 以下会将这种用多个变量模拟数组的形式称为“变量组”。 |
| }
| | |
| /* wikitable MD化 */
| | 作为变量组或变量组成员的变量名都以“@array-innerArrayIdentifier: ”为前缀,通常在使用时不需要关注这一点,这里只是提供一个说明。 |
| table.wikitable {
| | |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
| | === 构造变量组 === |
| border-radius: 4px;
| | <pre> |
| background-color: rgba(251,251,251,0.9) !important;
| | {{array|new|name=变量组名,必须传入 |
| overflow: hidden;
| | |数据1 |
| }
| | |数据2 |
| /* 回到顶部 */
| | |数据... |
| .backToTop {
| | |{{array|in <!-- 可以在模板内部使用in继续添加变量组,构建一个多维变量组 --> |
| display: none;
| | |数据... |
| width: 20px;
| | |{{array|in |
| padding: 5px 0;
| | |数据... |
| background-color: #000;
| | }} |
| color: #fff;
| | }} |
| font-size: 12px;
| | |
| text-align: center;
| | |r= 若r为true,则返回name参数的值}} |
| position: fixed;
| | </pre> |
| _position: absolute;
| | |
| right: 0; | | === 取值与设置 === |
| bottom: 100px;
| | ==== ''get'' ==== |
| _bottom: "auto";
| | <pre> |
| cursor: pointer;
| | {{array|get|变量组名|第一维序号|第二维序号|第三维序号|...}} |
| opacity: .6;
| | {{array|get|变量组名|count}} |
| filter: Alpha(opacity=60);
| | {{array|get|变量组名|第一维序号|count}} |
| z-index: 73;
| | {{array|get|变量组名|第一维序号|... 第n维序号|count}} |
| }
| | </pre> |
| .mw-mmv-lightbox-open .backToTop {
| | |
| display: none !important;
| | get可以获取变量组成员的值,但若试图获取变量组索引,则会失败并报错。 |
| }
| | |
| /* 隐藏编辑页面中的返回顶部按钮 */
| | ==== ''set'' ==== |
| .page-Mainpage .backToTop, | | <pre> |
| .action-edit .backToTop, | | {{array|set|变量组名|第一维序号|第二维序号|...|val=要设置的值}} |
| .action-submit .backToTop {
| | </pre> |
| display: none !important;
| | |
| } | | set可以设置变量组成员的值,但若试图对变量组索引赋值,则会失败并报错。 |
| /* 信息模板的css */
| | |
| .infotemplatebox { | | === 其他方法 === |
| float: right;
| | |
| width: 250px;
| | ==== ''push'' ==== |
| font-size: 90%;
| | <pre> |
| margin: 1em 0 1em 1em;
| | {{array|push|变量组名|第一维序号|第二维序号|...|val=要添加的值}} |
| background: #f9f9f9;
| | </pre> |
| border: 1px #999 solid;
| | |
| border-collapse: collapse;
| | 在变量组尾部追加一个值,其中定位要操作的变量组的方法和get一致。 |
| word-break: break-all;
| | |
| clear: right;
| | 若设置了<code>r=true</code>,则返回追加后变量组的长度。 |
| } | | |
| /* 编辑区样式 */ | | ==== ''pop'' ==== |
| .my-buttons {
| | <pre> |
| padding: .5em;
| | {{array|pop|变量组名|第一维序号|第二维序号|...}} |
| }
| | </pre> |
| .my-buttons a {
| | |
| text-decoration: none;
| | 删除变量组的最后一个值。若变量组长度为0,则不进行任何操作。 |
| border: 1px #069 outset;
| | |
| padding: .1em;
| | 若设置了<code>r=true</code>,则返回被删除的那个值。 |
| }
| | |
| .my-buttons a:hover, | | ==== ''unshift'' ==== |
| .my-buttons a:active { | | <pre> |
| border-style: inset;
| | {{array|unshift|变量组名|第一维序号|第二维序号|...|val=要添加的值}} |
| } | | </pre> |
| /* 解决pre不换行的问题 */ | | |
| pre { | | 在变量组头部追加一个值。 |
| white-space: pre-wrap; /* CSS-3 */
| | |
| white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
| | 若设置了<code>r=true</code>,则返回追加后变量组的长度。 |
| white-space: -pre-wrap; /* Opera 4-6 */
| | |
| white-space: -o-pre-wrap; /* Opera 7 */
| | ==== ''shift'' ==== |
| word-wrap: break-word; /* Internet Explorer 5.5+ */
| | <pre> |
| }
| | {{array|shift|变量组名|第一维序号|第二维序号|...}} |
| /* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */
| | </pre> |
| table.navbox {
| | |
| clear: both;
| | 删除变量组的第一个值。若变量组长度为0,则不进行任何操作。 |
| margin: auto;
| | |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
| | 若设置了<code>r=true</code>,则返回被删除的那个值。 |
| padding: 1px;
| | |
| text-align: center;
| | ==== ''getIndex'' ==== |
| width: 100%;
| | <pre> |
| } | | {{array|getIndex|变量组名|第一维序号|第二维序号|...}} |
| table.navbox+table.navbox {
| | </pre> |
| margin-top: -1px;
| | |
| }
| | 获取变量组的索引值。也可以获取到普通值,但因没有提示,所以并不推荐使用。 |
| .navbox-title,
| | |
| .navbox-abovebelow,
| | ==== ''ifIndex'' ==== |
| table.navbox th {
| | <pre> |
| padding-left: 1em;
| | {{array|ifIndex|变量组索引}} |
| padding-right: 1em;
| | </pre> |
| text-align: center;
| | |
| }
| | 判断一个字符串是否为变量组索引,是返回1,否返回空。 |
| .navbox-group {
| | |
| font-weight: 700;
| | ==== ''splice'' ==== |
| padding-left: 1em;
| | <pre> |
| padding-right: 1em;
| | {{array|splice |
| white-space: nowrap;
| | |index= 变量组索引 |
| }
| | |start= 操作起始位置,默认为1,不能超过要操作的变量组的长度 |
| .navbox,
| | |howmany= 要删除的成员数量,默认为1 |
| .navbox-subgroup {
| | |添加值... |
| background: none repeat scroll 0 0 #fdfdfd;
| | }} |
| }
| | </pre> |
| .navbox-list { | | |
| border-color: #fdfdfd;
| | 操作变量组的值,利用这个方法可以进行删除、添加、替换等操作。你可以把这个方法看作是JavaScript中数组的splice方法。 |
| }
| | |
| .navbox-title, | | 若设置了<code>r=true</code>,则返回新的变量组长度。 |
| table.navbox th {
| | |
| background: none repeat scroll 0 0 #a5e4a5;
| | ==== ''print'' ==== |
| }
| | <pre> |
| .navbox-abovebelow,
| | {{array|print|变量组名|第一维序号|第二维序号|...}} |
| .navbox-group,
| | </pre> |
| .navbox-subgroup .navbox-title {
| | |
| background: none repeat scroll 0 0 #c0ecc0;
| | 打印变量组,用于检查变量组当前的内容。 |
| }
| | |
| .navbox-subgroup .navbox-group, | | === 简写 === |
| .navbox-subgroup .navbox-abovebelow { | | ==== 构造时简写 ==== |
| background: none repeat scroll 0 0 #e6f6e6;
| | 构造时也可以省略“new”。这时,变量组的第一个值'''一定不能等于上面列出的方法中的任何一个(包括new)''',否则构造时将出现错误。 |
| }
| | |
| .navbox-even {
| | === 其他 === |
| background: none repeat scroll 0 0 #f5fcf5;
| | |
| }
| | 所有的参数名“name”也可以写成“id”。 |
| .navbox-odd {
| | |
| background: none repeat scroll 0 0 transparent;
| | === 在Lua中获取或构造 === |
| } | | |
| .collapseButton {
| | 请参考:[[Module:var-array]] |
| float: right;
| | |
| font-weight: 400;
| | == 示例 == |
| text-align: right;
| | === 示例{{n|init}} === |
| width: auto;
| | <pre> |
| }
| | {{array|new|name=arr |
| .navbox .collapseButton {
| | |ab |
| width: 6em;
| | |cd |
| }
| | |ef |
| /* Fix by case : Rev 1327309 ([[Special:Permalink/1327309]])
| | }} |
| Address alignment issue of nested tabs in Navbox */
| | {{array|get|arr|2}} |
| .navbox .TabLabel { | | </pre> |
| text-align: left;
| | '''结果''':{{array|new|name=arr |
| } | | |ab |
| /* Tabs */ | | |cd |
| .tab .TabLabelText {
| | |ef |
| border-top: 3px solid transparent;
| | }} |
| padding: 1px;
| | {{array|get|arr|2}} |
| background: #fff;
| | |
| border-left: 1px solid transparent;
| | === 示例{{n}} === |
| border-right: 1px solid transparent;
| | <pre> |
| cursor: pointer;
| | {{array|id=student |
| flex: none;
| | |{{array|in|shinobu|大宫忍|鬼畜木芥子}} |
| }
| | |{{array|in|alice|爱丽丝}} |
| .tab .TabLabel { | | }} |
| z-index: 2;
| | {{array|get|student|1|1}}、{{array|get|student|2|2}} |
| position: relative;
| | |
| -webkit-user-select: none;
| | student1数据总数:{{array|get|student|1|count}} |
| -moz-user-select: none;
| | |
| -ms-user-select: none;
| | 尝试对内部变量组1进行取值:{{array|get|student|1}} |
| -o-user-select: none;
| | </pre> |
| user-select: none;
| | '''结果''':{{array|id=student |
| display: flex;
| | |{{array|in|shinobu|大宫忍|鬼畜木芥子}} |
| flex-wrap: wrap;
| | |{{array|in|alice|爱丽丝}} |
| }
| | }} |
| .tab .TabLabelText.selected {
| | {{array|get|student|1|1}}、{{array|get|student|2|2}} |
| border-top: 3px solid green;
| | |
| padding: 1px;
| | student1数据总数:{{array|get|student|1|count}} |
| background: white;
| | |
| border-left: 1px solid #aaa;
| | 尝试对内部变量组1进行取值:{{array|get|student|1}} |
| border-right: 1px solid #aaa;
| | === 示例{{n}} === |
| }
| | |
| .tab .TabContent {
| | <pre> |
| background: white;
| | {{array|id=student |
| padding: 20px 30px;
| | |{{array|in|shinobu|大宫忍| |
| position: relative;
| | {{array|in |
| z-index: 1;
| | |短发|大和抚子 |
| border: 1px solid #aaa;
| | }} |
| } | | }} |
| .tab .TabContentText {
| | }} |
| display: none;
| | {{array|get|student|1|3|2}} |
| }
| | </pre> |
| .tab .TabContentText.selected {
| | '''结果''':{{array|id=student |
| display: block;
| | |{{array|in|shinobu|大宫忍| |
| } | | {{array|in |
| .Tabs .Tab {
| | |短发|大和抚子 |
| border-bottom: 1px solid #aaa;
| | }} |
| }
| | }} |
| .Tabs .Tab:first-child {
| | }} |
| border-top: 1px solid #aaa;
| | {{array|get|student|1|3|2}} |
| }
| | |
| .Tabs .Tab .TabLabelText {
| | === 示例{{n}} === |
| padding: 7px;
| | <pre> |
| } | | {{array|id=test |
| .Tabs .Tab .TabContentText {
| | |5,日,牧师 |
| padding: 3px;
| | |4,火,牧师 |
| } | | |3,火,剑士 |
| /* 表格宽度 */
| | |3,水,法师 |
| .wikitable {
| | }} |
| max-width: 100%;
| | {{array|shift|test}} |
| } | | {{array|get|test|1}} |
| /* 缩略图居中*/
| | </pre> |
| .thumb.tcenter {
| | '''结果''':{{array|id=test |
| float: none;
| | |5,日,牧师 |
| clear: both;
| | |4,火,牧师 |
| display: block;
| | |3,火,剑士 |
| margin: 0 auto;
| | |3,水 , 法师 |
| } | | }}{{array|shift|test}} |
| /* 用户页没有分类! */ | | {{array|get|test|1}} |
| body.ns-2 div#catlinks {
| | |
| display: none !important;
| | |
| } | | === 示例{{n}} === |
| /* 仅手机版显示支持 */
| | <pre> |
| .mobileonly {
| | {{array|id=test |
| display: none !important;
| | |111 |
| } | | |222 |
| /* 编辑请求 */
| | |333 |
| .editRequest {
| | |444 |
| text-align: center;
| | |555 |
| border: 1px solid #ddd;
| | }} |
| border-radius: 3px;
| | |
| margin:1em 2.5em;
| | {{array|splice |
| padding: 1em;
| | |index= {{array|getIndex|test}} |
| background: white;
| | |start=2 |
| }
| | |howmany= 3 |
| .editRequest .newComment {
| | |aaa|bbb |
| white-space: nowrap;
| | }} |
| background: #347bff;
| | |
| color: #fff;
| | {{array|print|test}} |
| border: 1px solid #347bff;
| | </pre> |
| text-shadow: 0 1px rgba(0,0,0,0.1);
| | {{array|id=test |
| font-family: inherit;
| | |111 |
| font-size: 1em;
| | |222 |
| min-width: 4em;
| | |333 |
| max-width: 28.75em;
| | |444 |
| padding: .5em 1em;
| | |555 |
| margin: 0;
| | }} |
| border-radius: 2px;
| | {{array|splice |
| -webkit-box-sizing: border-box;
| | |index= {{array|getIndex|test}} |
| -moz-box-sizing: border-box;
| | |start=2 |
| box-sizing: border-box;
| | |howmany= 3 |
| -webkit-appearance: none;
| | |aaa|bbb |
| zoom: 1;
| | }} |
| vertical-align: middle;
| | '''结果''': |
| text-align: center;
| | {{array|print|test}} |
| font-weight: bold;
| | |
| cursor: pointer;
| | <!-- |
| }
| | === 示例{{n}} === |
| /* 注释里的列表 */
| | <pre> |
| .reference-text > ul.listInRef,
| | {{array|id=角色信息表 |
| .reference-text > ol.listInRef {
| | |{{array|in|5|日|牧师}} |
| margin: -1.5em 0 0 2em;
| | |{{array|in|4|火|牧师}} |
| }
| | |{{array|in|3|火|剑士}} |
| /*
| | |{{array|in|3|水|法师}} |
| * Skeleton V2.0.4
| | }} |
| * Copyright 2014, Dave Gamache
| | {{array|unshiftSome|id={{array|getIndex|角色信息表}} |
| * www.getskeleton.com
| | |{{array|in|5|日|法师}} |
| * Free to use under the MIT license.
| | |{{array|in|5|风|炼金术师}} |
| * http://www.opensource.org/licenses/mit-license.php
| | }} |
| * 12/29/2014
| | {{array|get|角色信息表|1|3}} |
| */
| | |
| /* 以下内容已被萌百格式化 , 注释已被翻译 */
| | {{array|get|角色信息表|2|3}} |
| .container {
| | </pre> |
| position: relative;
| | {{array|id=角色信息表 |
| width: 100%;
| | |{{array|in|5|日|牧师}} |
| max-width: 960px;
| | |{{array|in|4|火|牧师}} |
| margin: 0 auto;
| | |{{array|in|3|火|剑士}} |
| padding: 0 20px;
| | |{{array|in|3|水|法师}} |
| box-sizing: border-box;
| | }} |
| }
| | {{array|unshiftSome|id={{array|getIndex|角色信息表}} |
| .div,
| | |{{array|in|5|日|法师}} |
| .divs,
| | |{{array|in|5|风|炼金术师}} |
| .column,
| | }} |
| .columns {
| | {{array|get|角色信息表|1|3}} |
| width: 100%;
| | |
| float: left;
| | {{array|get|角色信息表|2|3}} |
| box-sizing: border-box;
| | |
| } | | --> |
| /* 适用于屏幕像素宽度大于400px的设备 */
| | === 示例{{n}} === |
| @media (min-width: 400px) {
| | |
| .container {
| | <pre> |
| width: 85%;
| | {{array|id=角色信息表 |
| padding: 0;
| | |{{array|in|5|日|牧师}} |
| }
| | |{{array|in|4|火|牧师}} |
| } | | |{{array|in|3|火|剑士}} |
| /* 适用于屏幕像素宽度大于800px的设备 */ | | |{{array|in|3|水|法师}} |
| @media (min-width: 800px) {
| | }}<!-- |
| .container {
| | -->{{loop|times=1|{{array|get|角色信息表|count}}|do=<nowiki><nowiki></nowiki> |
| width: 80%;
| | 稀有度:{{array|get|角色信息表|{{#var:times}}|1}}<br/> |
| }
| | 职业:{{array|get|角色信息表|{{#var:times}}|2}}<br/> |
| .div,
| | 属性:{{array|get|角色信息表|{{#var:times}}|3}}<br/> |
| .divs,
| | <br/> |
| .column,
| | <nowiki><nowiki></nowiki> |
| .columns {
| | }} |
| margin-left: .3%;
| | |
| }
| | 打印变量组:{{array|print|角色信息表}} |
| .div:first-child,
| | </pre> |
| .divs:first-child,
| | {{array|id=角色信息表 |
| .column:first-child,
| | |{{array|in|5|日|牧师}} |
| .columns:first-child {
| | |{{array|in|4|火|牧师}} |
| margin-left: 0;
| | |{{array|in|3|火|剑士}} |
| }
| | |{{array|in|3|水|法师}} |
| .one.div,
| | }}<!-- |
| .one.divs {
| | -->{{loop|times=1|{{array|get|角色信息表|count}}|do=<nowiki> |
| width: 100%;
| | 稀有度:{{array|get|角色信息表|{{#var:times}}|1}}<br/> |
| margin-left: 0;
| | 职业:{{array|get|角色信息表|{{#var:times}}|2}}<br/> |
| }
| | 属性:{{array|get|角色信息表|{{#var:times}}|3}}<br/> |
| .two.divs {
| | <br/> |
| width: 49.85%;
| | </nowiki> |
| }
| | }} |
| .three.divs {
| | |
| width: 33.1333333333%;
| | 打印变量组:{{array|print|角色信息表}} |
| }
| | === 示例{{n}} === |
| .four.divs {
| | |
| width: 24.775%;
| | 使用{{tl|split}} 将每个变量的值分割成3个数据,输出。 |
| }
| | <pre> |
| .five.divs {
| | {{array|new|name=角色信息表 |
| width: 19.76%;
| | |5,日,牧师 |
| }
| | |4,火,牧师 |
| .six.divs {
| | |3,火,剑士 |
| width: 16.4166666667%;
| | |3,水,法师 |
| }
| | }}<!-- |
| .seven.divs {
| | -->{{#loop:times|1|{{array|get|角色信息表.count}} |
| width: 14.0285714286%;
| | |{{#vardefine:info|{{array|get|角色信息表|{{#var:times}}}}}} |
| }
| | {{split|{{#var:info}}|,|charaInfo}} |
| .eight.divs {
| | 稀有度:{{#var:charaInfo1}}<br/> |
| width: 12.2375%;
| | 属性:{{#var:charaInfo2}}<br/> |
| }
| | 职业:{{#var:charaInfo3}}<br/> |
| .nine.divs {
| | <br/> |
| width: 10.8444444444%;
| | }} |
| }
| | </pre> |
| .ten.divs {
| | {{array|new|name=角色信息表 |
| width: 9.73%;
| | |5,日 , 牧师 |
| }
| | |4,火,牧师 |
| .eleven.divs {
| | |3,火,剑士 |
| width: 8.81818181818%;
| | |3,水,法师 |
| }
| | }}<!-- |
| .twelve.divs {
| | -->{{#loop:times|1|{{array|get|角色信息表|count}} |
| width: 8.05833333333%;
| | |{{#vardefine:info|{{array|get|角色信息表|{{#var:times}}}}}} |
| }
| | {{split|{{#var:info}}|,|charaInfo}} |
| .one.column,
| | 稀 有 度:{{#var:charaInfo1}}<br/> |
| .one.columns {
| | 属性 :{{#var:charaInfo2}}<br/> |
| width: 8.05833333333%;
| | 职业:{{#var:charaInfo3}}<br/> |
| }
| | <br/> |
| .two.columns {
| | }} |
| width: 16.4166666667%;
| | |
| }
| | <includeonly>[[分类: 辅助模板]]<includeonly><noinclude>[[ 分类:模板说明文件]]</noinclude> |
| .three.columns {
| |
| width: 24.775%;
| |
| }
| |
| .four.columns {
| |
| width: 33.1333333333%;
| |
| }
| |
| .five.columns {
| |
| width: 41.4916666667%;
| |
| }
| |
| .six.columns {
| |
| width: 49.85%;
| |
| }
| |
| .seven.columns {
| |
| width: 58.2083333333%;
| |
| }
| |
| .eight.columns {
| |
| width: 66.5666666667%;
| |
| }
| |
| .nine.columns {
| |
| width: 74.925%;
| |
| }
| |
| .ten.columns {
| |
| width: 83.2833333333%;
| |
| }
| |
| .eleven.columns {
| |
| width: 91.6416666667%;
| |
| }
| |
| .twelve.columns {
| |
| width: 100%;
| |
| margin-left: 0;
| |
| }
| |
| .one-third.column {
| |
| width: 33.1333333333%;
| |
| }
| |
| .two-thirds.column {
| |
| width: 66.5666666667%;
| |
| }
| |
| .one-half.column {
| |
| width: 49.85%;
| |
| }
| |
| /* Offsets设置 */
| |
| .offset-by-one.column,
| |
| .offset-by-one.columns {
| |
| margin-left: 8.66666666667%;
| |
| }
| |
| .offset-by-two.column,
| |
| .offset-by-two.columns {
| |
| margin-left: 17.3333333333%;
| |
| }
| |
| .offset-by-three.column,
| |
| .offset-by-three.columns {
| |
| margin-left: 26%;
| |
| }
| |
| .offset-by-four.column,
| |
| .offset-by-four.columns {
| |
| margin-left: 34.6666666667%;
| |
| }
| |
| .offset-by-five.column,
| |
| .offset-by-five.columns {
| |
| margin-left: 43.3333333333%;
| |
| }
| |
| .offset-by-six.column,
| |
| .offset-by-six.columns {
| |
| margin-left: 52%;
| |
| }
| |
| .offset-by-seven.column,
| |
| .offset-by-seven.columns {
| |
| margin-left: 60.6666666667%;
| |
| }
| |
| .offset-by-eight.column,
| |
| .offset-by-eight.columns {
| |
| margin-left: 69.3333333333%;
| |
| }
| |
| .offset-by-nine.column,
| |
| .offset-by-nine.columns {
| |
| margin-left: 78.0%;
| |
| }
| |
| .offset-by-ten.column,
| |
| .offset-by-ten.columns {
| |
| margin-left: 86.6666666667%;
| |
| }
| |
| .offset-by-eleven.column,
| |
| .offset-by-eleven.columns {
| |
| margin-left: 95.3333333333%;
| |
| }
| |
| .offset-by-one-third.column,
| |
| .offset-by-one-third.columns {
| |
| margin-left: 34.6666666667%;
| |
| }
| |
| .offset-by-two-thirds.column,
| |
| .offset-by-two-thirds.columns {
| |
| margin-left: 69.3333333333%;
| |
| }
| |
| .offset-by-one-half.column,
| |
| .offset-by-one-half.columns {
| |
| margin-left: 52%;
| |
| }
| |
| } | |
| /* | |
| * 感谢[[萌百:User:Great Brightstar]]的贡献 , 源码来自[[special:diff/834104]]
| |
| * 以下是原注释:
| |
| * 在这里使用 font-feature-settings 属性会让使用“lang”标签的元素强制使用 OpenType 技术显示本地化的变体字(通过激活 locl 标签,即便浏览器本身不直接激活)。
| |
| * 如果你使用思源黑体(非 CN、JP、KO、TW 版)、Noto Sans CJK 显示文字的话就 有 可能看到效果。 | |
| * 关于上述这个 CSS 属性 的用法,参阅:https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings 注意:此文引用的 OpenType Feature Tags list 同样需要关注。
| |
| * 如有任何问题请即刻禁用之
| |
| * Nbdd0121: 将原来的[lang] 改为span[lang],这样就不会影响非{{lang}}的[lang] 了 (e.g. div#mw-content-text)
| |
| */
| |
| span[lang] {
| |
| font-family: initial;
| |
| font-feature-settings: "locl" on;
| |
| -webkit-font-feature-settings: "locl" on;
| |
| }
| |
| [style*="font"] span[lang] {
| |
| font-family: inherit;
| |
| }
| |
| /* 日语斜体 */
| |
| @font-face {
| |
| font-family: JapaneseItalic;
| |
| src: local(meiryo);
| |
| }
| |
| i span[lang=ja i],
| |
| span[lang=ja i] i,
| |
| [style*=italic i] span[lang=ja i],
| |
| span[lang=ja i] [style*=italic i] {
| |
| font-family: JapaneseItalic;
| |
| }
| |
| [style*="font"] i span[lang=ja i],
| |
| [style*="font"] span[lang=ja i] i,
| |
| [style*="font"] [style*=italic i] span[lang=ja i],
| |
| [style*="font"] span[lang=ja i] [style*=italic i] {
| |
| font-family: inherit;
| |
| }
| |
| /* 折叠表格的定位处理
| |
| body:not(.ns--1):not(.ns--2) .mw-collapsible > tbody > tr:first-child > th:last-child {
| |
| position: relative;
| |
| padding-right: 0;
| |
| }
| |
| body:not(.ns--1):not(.ns--2) .mw-collapsible:not(.mw-collapsed) > tbody > tr:first-child > th:last-child {
| |
| position: relative;
| |
| padding-left: 4em;
| |
| padding-right: 4em;
| |
| }
| |
| body:not(.ns--1):not(.ns--2) .mw-collapsible > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle {
| |
| margin: 0 .5em;
| |
| }
| |
| body:not(.ns--1):not(.ns--2) .mw-collapsible:not(.mw-collapsed) > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle {
| |
| position: absolute;
| |
| right: .5em;
| |
| top: .15em;
| |
| float: none;
| |
| margin: 0;
| |
| } */
| |
| /* 大家族模板下折叠表格的定位处理
| |
| body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible > tbody > tr:first-child > th:last-child {
| |
| position: relative;
| |
| padding-right: 0;
| |
| padding-left: 0;
| |
| }
| |
| body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible .mw-collapsible-toggle {
| |
| margin-left: 0;
| |
| }
| |
| body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible > tbody > tr:first-child > th:last-child > [style*="float:left"] {
| |
| position: absolute;
| |
| left: 1em;
| |
| top: 0;
| |
| float: none;
| |
| }
| |
| body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle {
| |
| position: absolute;
| |
| right: 1em;
| |
| top: 0;
| |
| float: none;
| |
| margin-left: 0;
| |
| }
| |
| body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible:not(.mw-collapsed) > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle:last-child {
| |
| position: static;
| |
| float: right;
| |
| margin-right: -3.5em;
| |
| } */
| |
| /* wikitable 的 caption */
| |
| .wikitable.mw-collapsible caption {
| |
| border: 1px solid rgba(170, 170, 170, 0.37);
| |
| border-bottom-width: 0;
| |
| background-color: rgb(249,249,249);
| |
| }
| |
| .wikitable.mw-collapsible.mw-collapsed caption {
| |
| border-bottom-width: 1px;
| |
| }
| |
| /* vectorMenu 的排序 */
| |
| div.vectorMenu ul {
| |
| display: flex;
| |
| flex-flow: column;
| |
| }
| |
| /* 分类页同开头的页面的列表不分段 */
| |
| .mw-category-group {
| |
| -webkit-column-break-inside: avoid;
| |
| page-break-inside: avoid;
| |
| break-inside: avoid;
| |
| }
| |
| .mw-category-group:nth-child(1):nth-last-child(1), /* 只有一个列表时 */
| |
| .mw-category-group:nth-child(1):nth-last-child(2), /* 只有两个列表时 */
| |
| .mw-category-group:nth-child(2):nth-last-child(1) { /* 只有两个列表时 */
| |
| -webkit-column-break-inside: auto;
| |
| page-break-inside: auto;
| |
| break-inside: auto;
| |
| }
| |
| /* R18模板 */
| |
| #x18 {
| |
| width: 100%;
| |
| height: 100%;
| |
| position: fixed;
| |
| top: 0;
| |
| background: rgba(0, 0, 0, 0.9);
| |
| z-index: 999;
| |
| opacity: 0;
| |
| }
| |
| #x18Context {
| |
| position: relative;
| |
| margin: 0 auto;
| |
| margin-top: -40px;
| |
| top: 50%;
| |
| width: 240px;
| |
| height: 80px;
| |
| background: #444;
| |
| color: white;
| |
| border: solid 1px rgb(118, 195, 255);
| |
| border-radius: 4px;
| |
| box-shadow: 0 0 5px rgb(118, 195, 255);
| |
| padding: 12px;
| |
| }
| |
| #x18Title {
| |
| margin: 12px;
| |
| }
| |
| #x18Icon {
| |
| position: relative;
| |
| border: 8px solid transparent;
| |
| border-left: 12px solid #fff;
| |
| float: left;
| |
| margin: 2px 0;
| |
| }
| |
| .x18Button {
| |
| text-align: center;
| |
| }
| |
| .x18Button div {
| |
| width: 72px;
| |
| height: 20px;
| |
| border-radius: 4px;
| |
| padding: 4px;
| |
| text-align: center;
| |
| font-size: 11pt;
| |
| display: inline-block;
| |
| cursor: pointer;
| |
| box-shadow: #777 0 0 22px inset;
| |
| }
| |
| .x18Button div:nth-child(2) {
| |
| margin-left: 26px;
| |
| }
| |
| #x18Yes {
| |
| background: rgb(57, 238, 0);
| |
| }
| |
| #x18No {
| |
| background: rgb(238, 48, 0);
| |
| }
| |
这是一个模拟数组形式生成结构化数据的模板,可以进行大量的存储、操作或传输数据,与lua通信。本质上就是一次声明多个命名有关联的变量。
因为未使用字符串处理,相对于使用字符串处理来分割参数的做法可以更安全地存储或传递数据。
以下会将这种用多个变量模拟数组的形式称为“变量组”。
作为变量组或变量组成员的变量名都以“@array-innerArrayIdentifier:”为前缀,通常在使用时不需要关注这一点,这里只是提供一个说明。
{{array|new|name=变量组名,必须传入
|数据1
|数据2
|数据...
|{{array|in <!-- 可以在模板内部使用in继续添加变量组,构建一个多维变量组 -->
|数据...
|{{array|in
|数据...
}}
}}
|r=若r为true,则返回name参数的值}}
{{array|get|变量组名|第一维序号|第二维序号|第三维序号|...}}
{{array|get|变量组名|count}}
{{array|get|变量组名|第一维序号|count}}
{{array|get|变量组名|第一维序号|...第n维序号|count}}
get可以获取变量组成员的值,但若试图获取变量组索引,则会失败并报错。
{{array|set|变量组名|第一维序号|第二维序号|...|val=要设置的值}}
set可以设置变量组成员的值,但若试图对变量组索引赋值,则会失败并报错。
{{array|push|变量组名|第一维序号|第二维序号|...|val=要添加的值}}
在变量组尾部追加一个值,其中定位要操作的变量组的方法和get一致。
若设置了r=true
,则返回追加后变量组的长度。
{{array|pop|变量组名|第一维序号|第二维序号|...}}
删除变量组的最后一个值。若变量组长度为0,则不进行任何操作。
若设置了r=true
,则返回被删除的那个值。
{{array|unshift|变量组名|第一维序号|第二维序号|...|val=要添加的值}}
在变量组头部追加一个值。
若设置了r=true
,则返回追加后变量组的长度。
{{array|shift|变量组名|第一维序号|第二维序号|...}}
删除变量组的第一个值。若变量组长度为0,则不进行任何操作。
若设置了r=true
,则返回被删除的那个值。
{{array|getIndex|变量组名|第一维序号|第二维序号|...}}
获取变量组的索引值。也可以获取到普通值,但因没有提示,所以并不推荐使用。
{{array|ifIndex|变量组索引}}
判断一个字符串是否为变量组索引,是返回1,否返回空。
{{array|splice
|index= 变量组索引
|start= 操作起始位置,默认为1,不能超过要操作的变量组的长度
|howmany= 要删除的成员数量,默认为1
|添加值...
}}
操作变量组的值,利用这个方法可以进行删除、添加、替换等操作。你可以把这个方法看作是JavaScript中数组的splice方法。
若设置了r=true
,则返回新的变量组长度。
{{array|print|变量组名|第一维序号|第二维序号|...}}
打印变量组,用于检查变量组当前的内容。
构造时也可以省略“new”。这时,变量组的第一个值一定不能等于上面列出的方法中的任何一个(包括new),否则构造时将出现错误。
所有的参数名“name”也可以写成“id”。
在Lua中获取或构造[编辑源代码]
请参考:Module:var-array
{{array|new|name=arr
|ab
|cd
|ef
}}
{{array|get|arr|2}}
结果:
cd
{{array|id=student
|{{array|in|shinobu|大宫忍|鬼畜木芥子}}
|{{array|in|alice|爱丽丝}}
}}
{{array|get|student|1|1}}、{{array|get|student|2|2}}
student1数据总数:{{array|get|student|1|count}}
尝试对内部变量组1进行取值:{{array|get|student|1}}
结果:
shinobu、爱丽丝
student1数据总数:3
尝试对内部变量组1进行取值:Lua错误:不能获取变量组的索引值。
{{array|id=student
|{{array|in|shinobu|大宫忍|
{{array|in
|短发|大和抚子
}}
}}
}}
{{array|get|student|1|3|2}}
结果:
大和抚子
{{array|id=test
|5,日,牧师
|4,火,牧师
|3,火,剑士
|3,水,法师
}}
{{array|shift|test}}
{{array|get|test|1}}
结果:
4,火,牧师
{{array|id=test
|111
|222
|333
|444
|555
}}
{{array|splice
|index= {{array|getIndex|test}}
|start=2
|howmany= 3
|aaa|bbb
}}
{{array|print|test}}
结果:
table#1 {
"111",
"aaa",
"bbb",
"555",
}
{{array|id=角色信息表
|{{array|in|5|日|牧师}}
|{{array|in|4|火|牧师}}
|{{array|in|3|火|剑士}}
|{{array|in|3|水|法师}}
}}<!--
-->{{loop|times=1|{{array|get|角色信息表|count}}|do=<nowiki>
稀有度:{{array|get|角色信息表|{{#var:times}}|1}}<br/>
职业:{{array|get|角色信息表|{{#var:times}}|2}}<br/>
属性:{{array|get|角色信息表|{{#var:times}}|3}}<br/>
<br/>
<nowiki>
}}
打印变量组:{{array|print|角色信息表}}
稀有度:5
职业:日
属性:牧师
稀有度:4
职业:火
属性:牧师
稀有度:3
职业:火
属性:剑士
稀有度:3
职业:水
属性:法师
打印变量组:
table#1 {
table#2 {
"5",
"日",
"牧师",
},
table#3 {
"4",
"火",
"牧师",
},
table#4 {
"3",
"火",
"剑士",
},
table#5 {
"3",
"水",
"法师",
},
}
使用{{split}}将每个变量的值分割成3个数据,输出。
{{array|new|name=角色信息表
|5,日,牧师
|4,火,牧师
|3,火,剑士
|3,水,法师
}}<!--
-->{{#loop:times|1|{{array|get|角色信息表.count}}
|{{#vardefine:info|{{array|get|角色信息表|{{#var:times}}}}}}
{{split|{{#var:info}}|,|charaInfo}}
稀有度:{{#var:charaInfo1}}<br/>
属性:{{#var:charaInfo2}}<br/>
职业:{{#var:charaInfo3}}<br/>
<br/>
}}
稀有度:5
属性:日
职业:牧师
稀有度:4
属性:火
职业:牧师
稀有度:3
属性:火
职业:剑士
稀有度:3
属性:水
职业:法师