Template:替换侧边栏底图:修订间差异
模板页面
更多语言
更多操作
删除的内容 添加的内容
尝试加入链入 |
小 // Edit via InPageEdit |
||
| (未显示2个用户的2个中间版本) | |||
| 第1行: | 第1行: | ||
<includeonly><div class="nomobile sidebar-character" data-align="{{{align|bottom}}}" style="display:none;width:{{{width|auto}}};{{#if:{{{bottom|}}}|margin-{{{align|bottom}}}:{{{bottom}}};}}{{#if:{{{left|}}}|margin-left:{{{left}}};}}{{#if:{{{transform|}}}|transform:{{{transform}}};}}{{{style|}}}"> |
<includeonly><div class="nomobile sidebar-character" data-align="{{{align|bottom}}}" style="display:none;width:{{{width|auto}}};{{#if:{{{bottom|}}}|margin-{{{align|bottom}}}:{{{bottom}}};}}{{#if:{{{left|}}}|margin-left:{{{left}}};}}{{#if:{{{transform|}}}|transform:{{{transform}}};}}{{{style|}}}">{{#img:|src={{#if:{{filepath:{{#titleparts:{{PAGENAME:{{{1|{{{url|}}}}}}}}}}}}|{{filepath:{{#titleparts:{{PAGENAME:{{{1|{{{url|}}}}}}}}}}}}|{{{1|{{{url|}}}}}}}}}}{{#if:{{filepath:{{#titleparts:{{PAGENAME:{{{1|{{{url|}}}}}}}}}}}}|<div style="display:none">[[File:{{#titleparts:{{PAGENAME:{{{1|{{{url|}}}}}}}}}}|1px]]</div>}}</div>{{ac|侧边栏有彩蛋的条目}}{{#ifeq:{{{width|}}}|100%|{{ac|错误使用替换侧边栏底图的条目}}}}</includeonly><noinclude>[[分类:影响页面内容的模板]][[分类:图像模板]]{{doc}}</noinclude> |
||
2025年10月28日 (二) 16:27的最新版本
设立这个模板的目的是为了不让移动版用户在访问替换了侧边栏底图的页面时底图影响阅读。
使用方式
直接把以下内容复制入要使用的页面中就可使用
{{替换侧边栏底图
|url=
}}
说明:
{{替换侧边栏底图
|url=替换的图片名(可以是内部图片或外部图片;内部图片不需要加“File:”前缀)
|align=图片定位(默认bottom,可填top/bottom)
|bottom=图片与底部/顶部边框的距离。(选填,默认为0px,单位可选px或%)
|left=图片与左侧边框的距离。(选填,默认为0px,实际效果始终会减去3px,即默认为-3px,单位可选px或%)
|width=图片宽度(选填,默认auto,单位可选px或%)
|transform=对图片进行变形,不建议新手使用该功能
|style=对图片容器添加额外样式,如加入{{像素图}}
}}
其中url参数也可以简写成第一个默认参数,如:
{{替换侧边栏底图|Miliu.png}}
注意事项
注意:如果不填入图片的地址,则该模板无效。
如果填入的内链图片文件名错误,可能会导致{{背景图片}}也无法显示。
※ 请将这个模板置于条目页底(而不是页顶),否则更新姬将会抓取本模板中的图片当成条目配图推送。
※ 请将这个模板置于条目的==外部链接==之上。
其他
- {{背景图片}}
| ||||||||||||||||||||||||||||