MCBBS Wiki欢迎您共同参与编辑!在参与编辑之前请先阅读Wiki方针。
如果在编辑的过程中遇到了什么问题,可以去讨论板提问。
为了您能够无阻碍地参与编辑 未验证/绑定过邮箱的用户,请尽快绑定/验证。
MCBBS Wiki GitHub群组已上线!
您可以在回声洞中发表吐槽!
服务器状态监控。点击进入
本站由MCBBS用户自行搭建,与MCBBS及东银河系漫游指南(北京)科技有限公司没有从属关系。点此了解 MCBBS Wiki 不是什么>>
MCBBS Wiki:嵌入/运作方式:修订间差异
跳到导航
跳到搜索
Salt lovely(留言 | 贡献) (嵌入的运作方式) |
Salt lovely(留言 | 贡献) 小 (样式修复) |
||
| 第69行: | 第69行: | ||
.tran-warpper { | .tran-warpper { | ||
display: inline-flex; | display: inline-flex; | ||
flex-wrap: nowrap; | |||
} | } | ||
.tran-page { | .tran-page { | ||
position: relative; | |||
width: 150px; | width: 150px; | ||
height: 196px; | height: 196px; | ||
| 第77行: | 第79行: | ||
border: 1px solid #9999; | border: 1px solid #9999; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
} | |||
.tran-page + .tran-page { | |||
margin-left: 4px; | |||
} | |||
.tran-page.blue { | |||
background-color: #9cf3; | |||
border-color: #9cfc; | |||
} | |||
.tran-page.yellow { | |||
background-color: #fc93; | |||
border-color: #fc9c; | |||
} | |||
.tran-page.tran-page-code.blue { | |||
background-color: #9cf1; | |||
} | |||
.tran-page.tran-page-code.yellow { | |||
background-color: #fc91; | |||
} | |||
.tran-page.tran-page-code::after { | |||
content: '<代码>'; | |||
opacity: .25; | |||
position: absolute; | |||
right: 8px; | |||
bottom: 8px; | |||
} | |||
.tran-title { | |||
padding-bottom: 4px; | |||
margin-bottom: 4px; | |||
border-bottom: 1px solid #ccc6; | |||
text-align: center; | |||
} | } | ||
}} | }} | ||
2022年8月17日 (三) 23:00的版本
这个页面用于解释嵌入操作的运作模式。
运作方式
嵌入的具体操作可以简单地理解为,将某个文档(或者片段)复制到其他文档的指定位置:其中提供内容的文档称为嵌入的“来源”,接受内容的文档称为嵌入的“目标”。
在MediaWiki中(本站使用的Wiki软件),你需要在目标文档使用以下代码完成嵌入:{{来源文档}}
来源文档
盐酱世界第一可爱!
目标文档
目标文档内容1
{{来源文档}}
目标文档内容2
{{来源文档}}
目标文档内容2
来源文档
盐酱世界第一可爱!
目标文档
目标文档内容1
盐酱世界第一可爱!
目标文档内容2
盐酱世界第一可爱!
目标文档内容2
当然,你也可以将来源文档嵌入到多个目标文档里,或者在一个目标文档里嵌入多次。
来源文档
盐酱世界第一可爱!
目标文档1
目标文档内容1
{{来源文档}}
目标文档内容2
{{来源文档}}
目标文档内容2
目标文档2
{{来源文档}}
其他内容
{{来源文档}}
其他内容
{{来源文档}}
来源文档
盐酱世界第一可爱!
目标文档1
目标文档内容1
盐酱世界第一可爱!
目标文档内容2
盐酱世界第一可爱!
目标文档内容2
目标文档2
盐酱世界第一可爱!
其他内容
盐酱世界第一可爱!
其他内容
盐酱世界第一可爱!
{{#css: .tran-warpper {
display: inline-flex; flex-wrap: nowrap;
} .tran-page {
position: relative; width: 150px; height: 196px; padding: 4px 8px; font-size: 14px; border: 1px solid #9999; box-sizing: border-box;
} .tran-page + .tran-page {
margin-left: 4px;
} .tran-page.blue {
background-color: #9cf3; border-color: #9cfc;
} .tran-page.yellow {
background-color: #fc93; border-color: #fc9c;
} .tran-page.tran-page-code.blue {
background-color: #9cf1;
} .tran-page.tran-page-code.yellow {
background-color: #fc91;
} .tran-page.tran-page-code::after {
content: '<代码>'; opacity: .25; position: absolute; right: 8px; bottom: 8px;
} .tran-title {
padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid #ccc6; text-align: center;
} }}