模板:图片框:修订间差异
外观
| 第1行: | 第1行: | ||
{{#if:{{{图片|}}}| | {{#if:{{{图片|}}}| | ||
{{#if:{{#pos:{{{图片|}}}|http://}}|{{#pos:{{{图片|}}}|https://}}| | |||
<div class="scp-image-block block-{{{align|right}}}" style="width:{{{width|300px}}}; display: inline-block;"> | <!-- 包含http://或https:// --> | ||
<htmltag tagname="img" src="{{{图片|}}}" style="width: 100%; height: auto; display: block;" alt="{{{alt-text|}}}" class="scp-image"></htmltag> | <div class="scp-image-block block-{{{align|right}}}" style="width:{{{width|300px}}}; display: inline-block;"> | ||
{{#if:{{{描述|}}}| | <htmltag tagname="img" src="{{{图片|}}}" style="width: 100%; height: auto; display: block;" alt="{{{alt-text|}}}" class="scp-image"></htmltag> | ||
<div class="scp-image-caption" style="font-size: 0.9em; text-align: center; margin-top: 0.5em;">{{{描述}}}</div> | {{#if:{{{描述|}}}| | ||
}} | <div class="scp-image-caption" style="font-size: 0.9em; text-align: center; margin-top: 0.5em;">{{{描述}}}</div> | ||
</div> | }} | ||
</div> | |||
| | |||
<!-- 不包含http前缀 --> | |||
<div class="scp-image-block block-{{{align|right}}}" style="width:{{{width|300px}}}; display: inline-block;"> | |||
[[File:{{{图片|}}}|{{#replace:{{{width|300px}}}|px|}}px|{{{alt-text|}}}|class=scp-image]] | |||
{{#if:{{{描述|}}}| | |||
<div class="scp-image-caption" style="font-size: 0.9em; text-align: center; margin-top: 0.5em;">{{{描述}}}</div> | |||
}} | |||
</div> | |||
}} | |||
| | | | ||
<div style="color:red">未填写图片链接</div> | <div style="color:red">未填写图片链接</div> | ||
}} | }} | ||
2026年2月23日 (一) 09:15的版本
未填写图片链接