「テンプレート:Image」の版間の差分
(タグ: 方括号不配对) |
|||
1行目: | 1行目: | ||
− | {{#ifeq:{{{type|}}}|outer||<div style="display:none !important;">[[file:{{{pic|{{{img|}}}}}}|1px]]</div>}}<!-- Fix unmarked usage | + | {{#ifeq:{{{种类|{{{type|}}}}}}|outer||<div style="display:none !important;">[[file:{{{图片|{{{pic|{{{img|}}}}}}}}}|1px]]</div>}}<!-- Fix unmarked usage |
--><div class="image-box" style="<!-- | --><div class="image-box" style="<!-- | ||
− | -->display:{{{display|block}}};<!-- | + | -->display:{{{显示类型|{{{display|block}}}}}};<!-- |
− | -->width:{{#expr:{{{width|0}}}+{{{wd|0}}}-{{{clip-r|0}}}-{{{clip-l|0}}}}}px;<!-- | + | -->width:{{#expr:{{{width|0}}}+{{{宽|{{{wd|0}}}}}}-{{{右|{{{clip-r|0}}}}}}-{{{左|{{{clip-l|0}}}}}}}}px;<!-- |
-->height:{{#expr: | -->height:{{#expr: | ||
{{{height|0}}} | {{{height|0}}} | ||
− | +{{#switch:{{{type|none}}}{{{phase|}}} | + | +{{#switch:{{{种类|{{{type|none}}}}}}{{{段落|{{{phase|}}}}}} |
|tall | |tall | ||
|talldiv | |talldiv | ||
14行目: | 14行目: | ||
|abs({{{capht|25}}})}} | |abs({{{capht|25}}})}} | ||
|#default=0}} | |#default=0}} | ||
− | +{{#ifexpr:{{{ht|0}}}<=0 | + | +{{#ifexpr:{{{高|{{{ht|0}}}}}}<=0 |
− | |{{{wd|0}}}*{{{k|0}}} | + | |{{{宽|{{{wd|0}}}}}}*{{{宽高比|{{{k|0}}}}}} |
− | |{{{ht|0}}}}} | + | |{{{高|{{{ht|0}}}}}}}} |
− | -{{{clip-b|0}}} | + | -{{{下|{{{clip-b|0}}}}}} |
− | -{{{clip-t|0}}} | + | -{{{上|{{{clip-t|0}}}}}} |
}}px;<!-- | }}px;<!-- | ||
-->position:relative;<!-- | -->position:relative;<!-- | ||
− | -->{{#switch:{{{type|none}}}{{{phase|}}} | + | -->{{#switch:{{{种类|{{{type|none}}}}}}{{{段落|{{{phase|}}}}}} |
|tall | |tall | ||
|talldiv | |talldiv | ||
28行目: | 28行目: | ||
|box=border:1px solid #ccc;background-color:#f9f9f9; | |box=border:1px solid #ccc;background-color:#f9f9f9; | ||
|#default=}}<!-- | |#default=}}<!-- | ||
− | -->{{{style|}}}"><!-- | + | -->{{{样式|{{{style|}}}}}}"><!-- |
--><div style="<!-- | --><div style="<!-- | ||
− | -->width:{{#ifeq:{{{pos|absolute}}}|absolute|{{#expr:{{{width|0}}}+{{{wd|0}}}-{{{clip-r|0}}}-{{{clip-l|0}}}}}px|auto}};<!-- | + | -->width:{{#ifeq:{{{pos|absolute}}}|absolute|{{#expr:{{{width|0}}}+{{{宽|{{{wd|0}}}}}}-{{{右|{{{clip-r|0}}}}}}-{{{左|{{{clip-l|0}}}}}}}}px|auto}};<!-- |
-->height:{{#ifeq:{{{pos|absolute}}}|absolute|{{#expr: | -->height:{{#ifeq:{{{pos|absolute}}}|absolute|{{#expr: | ||
{{{height|0}}} | {{{height|0}}} | ||
− | +{{#ifexpr:{{{ht|0}}}<=0 | + | +{{#ifexpr:{{{高|{{{ht|0}}}}}}<=0 |
− | |{{{wd|0}}}*{{{k|0}}} | + | |{{{宽|{{{wd|0}}}}}}*{{{宽高比|{{{k|0}}}}}} |
− | |{{{ht|0}}}}} | + | |{{{高|{{{ht|0}}}}}}}} |
− | -{{{clip-b|0}}} | + | -{{{下|{{{clip-b|0}}}}}} |
− | -{{{clip-t|0}}} | + | -{{{上|{{{clip-t|0}}}}}} |
}}px|auto}};<!-- | }}px|auto}};<!-- | ||
-->border-radius:{{{rads|{{{rad1|{{{radius|0}}}}}}{{{rad1-dt|{{{rad-dt|px}}}}}} {{{rad2|{{{radius|0}}}}}}{{{rad2-dt|{{{rad-dt|px}}}}}} {{{rad3|{{{radius|0}}}}}}{{{rad3-dt|{{{rad-dt|px}}}}}} {{{rad4|{{{radius|0}}}}}}{{{rad4-dt|{{{rad-dt|px}}}}}}}}};<!-- | -->border-radius:{{{rads|{{{rad1|{{{radius|0}}}}}}{{{rad1-dt|{{{rad-dt|px}}}}}} {{{rad2|{{{radius|0}}}}}}{{{rad2-dt|{{{rad-dt|px}}}}}} {{{rad3|{{{radius|0}}}}}}{{{rad3-dt|{{{rad-dt|px}}}}}} {{{rad4|{{{radius|0}}}}}}{{{rad4-dt|{{{rad-dt|px}}}}}}}}};<!-- | ||
-->position:{{{pos|absolute}}};<!-- | -->position:{{{pos|absolute}}};<!-- | ||
− | -->left:{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-h|{{#expr:{{{{{{h|0}}}+{{{iflink+h|0}}}}}}}}|{{{h|0}}}}}px;<!-- | + | -->left:{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-h|{{#expr:{{{横|{{{h|0}}}}}}+{{{iflink+h|0}}}}}}}}|{{{横|{{{h|0}}}}}}}}px;<!-- |
− | -->top:{{#expr:{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-v|{{#expr:{{{v|0}}}+{{{iflink+v|0}}}}}}}}|{{{v|0}}}}}-{{#ifexpr:{{{capht|25}}}<0|{{{capht|0}}}|0}}}}px;<!-- | + | -->top:{{#expr:{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-v|{{#expr:{{{纵|{{{v|0}}}}}}+{{{iflink+v|0}}}}}}}}|{{{纵|{{{v|0}}}}}}}}-{{#ifexpr:{{{capht|25}}}<0|{{{capht|0}}}|0}}}}px;<!-- |
− | -->{{#switch:{{{type|none}}}{{{phase|}}} | + | -->{{#switch:{{{种类|{{{type|none}}}}}}{{{段落|{{{phase|}}}}}} |
|talldiv | |talldiv | ||
|tall=overflow-x:hidden;overflow-y:scroll; | |tall=overflow-x:hidden;overflow-y:scroll; | ||
51行目: | 51行目: | ||
-->z-index:1<!-- | -->z-index:1<!-- | ||
-->"><!-- | -->"><!-- | ||
− | -->{{#switch:{{{type|none}}}}}}{{{phase|}}} | + | -->{{#switch:{{{种类|{{{type|none}}}}}}{{{段落|{{{phase|}}}}}} |
|talldiv | |talldiv | ||
|widediv | |widediv | ||
|div=<div style="<!-- | |div=<div style="<!-- | ||
-->position:absolute;<!-- | -->position:absolute;<!-- | ||
− | -->background:{{{bgk|none}}};<!-- | + | -->background:{{{背景色|{{{bgk|none}}}}}};<!-- |
-->box-shadow:{{{shadow| | -->box-shadow:{{{shadow| | ||
{{{左阴影|{{{阴影粗细|0}}}}}}px 0px {{{左模糊|{{{模糊|0}}}}}}px {{{左阴影色|{{{阴影色|}}}}}} {{{阴影模式|inset}}}, | {{{左阴影|{{{阴影粗细|0}}}}}}px 0px {{{左模糊|{{{模糊|0}}}}}}px {{{左阴影色|{{{阴影色|}}}}}} {{{阴影模式|inset}}}, | ||
70行目: | 70行目: | ||
|<div style="<!-- | |<div style="<!-- | ||
-->position:{{{pos|absolute}}};<!-- | -->position:{{{pos|absolute}}};<!-- | ||
− | -->background:{{{bgk|none}}};<!-- | + | -->background:{{{背景色|{{{bgk|none}}}}}};<!-- |
-->box-shadow:{{{shadow| | -->box-shadow:{{{shadow| | ||
{{{左阴影|{{{阴影粗细|0}}}}}}px 0px {{{左模糊|{{{模糊|0}}}}}}px {{{左阴影色|{{{阴影色|}}}}}} {{{阴影模式|inset}}}, | {{{左阴影|{{{阴影粗细|0}}}}}}px 0px {{{左模糊|{{{模糊|0}}}}}}px {{{左阴影色|{{{阴影色|}}}}}} {{{阴影模式|inset}}}, | ||
78行目: | 78行目: | ||
-->top:{{#expr:0-{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-y|{{#expr:{{{y|0}}}+{{{iflink+y|0}}}}}}}}|{{{y|0}}}}}-{{{上|{{{clip-t|0}}}}}}}}px;<!-- | -->top:{{#expr:0-{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-y|{{#expr:{{{y|0}}}+{{{iflink+y|0}}}}}}}}|{{{y|0}}}}}-{{{上|{{{clip-t|0}}}}}}}}px;<!-- | ||
-->left:{{#expr:0-{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-x|{{#expr:{{{x|0}}}+{{{iflink+x|0}}}}}}}}|{{{x|0}}}}}-{{{左|{{{clip-l|0}}}}}}}}px;<!-- | -->left:{{#expr:0-{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-x|{{#expr:{{{x|0}}}+{{{iflink+x|0}}}}}}}}|{{{x|0}}}}}-{{{左|{{{clip-l|0}}}}}}}}px;<!-- | ||
− | -->"><img class="image" style="position:relative;z-index:-1;{{{img-css|}}}" src="{{#switch:{{{type|null}}} | + | -->"><img class="image" style="position:relative;z-index:-1;{{{img-css|}}}" src="{{#switch:{{{种类|{{{type|null}}}}}} |
− | |outer={{{pic|{{{img|null}}}}}} | + | |outer={{{图片|{{{pic|{{{img|null}}}}}}}}} |
− | |#default={{#ifeq:{{{thumb|no}}}|yes|{{fullurl:cm:}}thumb.php?f={{{pic|{{{img|}}}}}}&width={{{resize|{{{wd|0}}}}}}|{{filepath:{{PAGENAME:File:{{{pic|{{{img|null}}}}}}}}}}}}}}<!-- | + | |#default={{#ifeq:{{{thumb|no}}}|yes|{{fullurl:cm:}}thumb.php?f={{{图片|{{{pic|{{{img|}}}}}}}}}&width={{{缩放|{{{resize|{{{宽|{{{wd|0}}}}}}}}}}}}|{{filepath:{{PAGENAME:File:{{{图片|{{{pic|{{{img|null}}}}}}}}}}}}}}}}}<!-- |
− | -->" width="{{#ifeq:{{{pos|absolute}}}|absolute|{{{resize|{{{wd|0}}}}}}px|auto}}" /></div> | + | -->" width="{{#ifeq:{{{pos|absolute}}}|absolute|{{{缩放|{{{resize|{{{宽|{{{wd|0}}}}}}}}}}}}px|auto}}" /></div> |
|[[{{{link|{{{iflink|null}}}}}}|<span style="<!-- | |[[{{{link|{{{iflink|null}}}}}}|<span style="<!-- | ||
-->position:{{{pos|absolute}}};<!-- | -->position:{{{pos|absolute}}};<!-- | ||
-->top:{{#expr:0-{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-y|{{#expr:{{{y|0}}}+{{{iflink+y|0}}}}}}}}|{{{y|0}}}}}-{{{上|{{{clip-t|0}}}}}}}}px;<!-- | -->top:{{#expr:0-{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-y|{{#expr:{{{y|0}}}+{{{iflink+y|0}}}}}}}}|{{{y|0}}}}}-{{{上|{{{clip-t|0}}}}}}}}px;<!-- | ||
-->left:{{#expr:0-{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-x|{{#expr:{{{x|0}}}+{{{iflink+x|0}}}}}}}}|{{{x|0}}}}}-{{{左|{{{clip-l|0}}}}}}}}px;<!-- | -->left:{{#expr:0-{{#ifeq:{{PAGENAME}}|{{{iflink|about:blank}}}|{{{iflink-x|{{#expr:{{{x|0}}}+{{{iflink+x|0}}}}}}}}|{{{x|0}}}}}-{{{左|{{{clip-l|0}}}}}}}}px;<!-- | ||
− | -->max-width:{{{resize|{{{wd|1000}}}}}}px !important;<!-- | + | -->max-width:{{{缩放|{{{resize|{{{宽|{{{wd|1000}}}}}}}}}}}}px !important;<!-- |
− | -->"><img class="image" style="position:relative;z-index:-1;{{{img-css|}}}" src="{{#switch:{{{type|null}}} | + | -->"><img class="image" style="position:relative;z-index:-1;{{{img-css|}}}" src="{{#switch:{{{种类|{{{type|null}}}}}} |
− | |outer={{{pic|{{{img|null}}}}}} | + | |outer={{{图片|{{{pic|{{{img|null}}}}}}}}} |
− | |#default={{#ifeq:{{{thumb|no}}}|yes|{{fullurl:cm:}}thumb.php?f={{{pic|{{{img|}}}}}}&width={{{resize|{{{wd|0}}}}}}|{{filepath:{{PAGENAME:File:{{{pic|{{{img|null}}}}}}}}}}}}}}<!-- | + | |#default={{#ifeq:{{{thumb|no}}}|yes|{{fullurl:cm:}}thumb.php?f={{{图片|{{{pic|{{{img|}}}}}}}}}&width={{{缩放|{{{resize|{{{宽|{{{wd|0}}}}}}}}}}}}|{{filepath:{{PAGENAME:File:{{{图片|{{{pic|{{{img|null}}}}}}}}}}}}}}}}}<!-- |
− | -->" width="{{#ifeq:{{{pos|absolute}}}|absolute|{{{resize|{{{wd|0}}}}}}}px|auto}}" /></span>]]}}}}<!-- | + | -->" width="{{#ifeq:{{{pos|absolute}}}|absolute|{{{缩放|{{{resize|{{{宽|{{{wd|0}}}}}}}}}}}}px|auto}}" /></span>]]}}}}<!-- |
--></div><!-- | --></div><!-- | ||
--><div {{#if:{{{desc|caption}}}|class="thumbcaption"}} style="<!-- | --><div {{#if:{{{desc|caption}}}|class="thumbcaption"}} style="<!-- | ||
100行目: | 100行目: | ||
-->overflow:{{#ifeq:{{{pos|absolute}}}|absolute|inherit|auto}};<!-- | -->overflow:{{#ifeq:{{{pos|absolute}}}|absolute|inherit|auto}};<!-- | ||
-->"><!-- | -->"><!-- | ||
− | -->{{#switch:{{{type|none}}}{{{phase|}}} | + | -->{{#switch:{{{种类|{{{type|none}}}}}}{{{段落|{{{phase|}}}}}} |
|tall | |tall | ||
|talldiv | |talldiv | ||
107行目: | 107行目: | ||
|box={{{desc|caption}}} | |box={{{desc|caption}}} | ||
|#default=}}<!-- | |#default=}}<!-- | ||
− | -->{{#switch:{{{phase|}}} | + | -->{{#switch:{{{段落|{{{phase|}}}}}} |
|div= | |div= | ||
|#default={{#switch:{{{caplink|null}}} | |#default={{#switch:{{{caplink|null}}} | ||
|null= | |null= | ||
− | |#default=<div style="float:right;">[{{fullurl:cm:File:{{{pic|{{{img|null}}}}}}}} {{{caplink|null}}}]</div>}}}}<!-- | + | |#default=<div style="float:right;">[{{fullurl:cm:File:{{{图片|{{{pic|{{{img|null}}}}}}}}}}} {{{caplink|null}}}]</div>}}}}<!-- |
--></div><!-- | --></div><!-- | ||
− | --></div> | + | --></div><noinclude>{{Documentation}}</noinclude> |
2024年10月20日 (日) 01:51時点における最新版
Bleeding line
相关应用
protype
<div style="position:relative;display:inline-block;"> <div style="position:absolute;top:0;left0;max-width:1000px !important;width:260px;height:430px;overflow:hidden;"> <img src="{{filepath:画像の名前.png}}" width="480px" style="position:absolute;left:-130px;top:-130px;"/> </div> </div>
Attributes 説明
- fullname(short):description
- display(dis):this attribute decided element's display type,the default value is block。CSS display 属性
- type:The default value is null.The valid parameter could be tall,wide,box,outer,div.Tall image use 'tall',wide image use 'wide',and there will be a scrollbar.'box' just as framed box that could be a description area,use text(txt) to write sth.'div' that makes pic attribute no limit.
- phase(p):the default value is null,the valid parameter could bediv。(But I just forget what can it do)
- text(txt):description.the default value is 'description'.If the type is box、outer、tall、wide,there will be a border:1px solid #ccc.
- p-ht:Tips:Do not use this with outer-y.
- link-text:Add a link-text to description area,outer link is not OK。
- link:outer link is not OK。
- pic:The default value is null.If want to use outer picture,use 'outer' type。
- Tips:These Attributes ues 'px',just be a number,percent is not surported.
- wd:Decided width,the default value is 0.Element width,picture wide.
- ht:Decided height,the default value is 0.Element height.
- k:Decided aspect ratio,the default value is 0,only if ht=0,ht=wt*k.
- width:Decided bleeding line,the default value is 0,Sprites mode.
- height:Decided bleeding line,the default value is 0,Sprites mode.
- x:Decide Bleeding line horizontal offset,the default value is 0,Sprites mode.
- y:Decide Bleeding line vertical offset,the default value is 0,Sprites mode.
- radius:border-radius,the default value is 0.
- resize:resize a picture,it will overwirte partial wd&width.Sprites mode.
- If you want a srcollbar that must be a resize attribute.IMPORTANT
- left(lt):Cut off from left,the default value is 0。
- up:Cut off from top,the default value is 0。
- left(lt):Cut off from right,the default value is 0。
- down(dn):Cut off from bottom,the default value is 0。
- out-x:Decide element horizontal offset,the default value is 0。
- out-y:Decide element vertical offset,the default value is 0。
Tips
- If you don't kown a picture's size,you can ues resize to set it's size.That makes wd and width equls resize,just ues x&y to offset the picture.
- just like:……|resize=100|wd=100|ht=100|x={{#expr:100*0}}|y={{#expr:120*3}}……
例
{{image|display=inline-block|pic=Wynn_the_Wind_Charmer.jpg|wd=250|ht=250|type=box|p-ht=25|text=風霊使いウィン|link-text=風霊使い ウィン}} {{image|display=inline-block|pic=Wynn_the_Wind_Charmer.jpg|wd=250|ht=250|x=20|y=-100|out-ht=20}} {{image|display=inline-block|pic=Wynn_the_Wind_Charmer.jpg|wd=250|ht=250|up=20|lt=30|rt=85}} {{image|display=inline-block|pic=Wynn_the_Wind_Charmer.jpg|wd=500|ht=250|radius=30|lt=125|rt=125|up=150|down=-150}} {{image|display=inline-block|pic=Wynn_the_Wind_Charmer.jpg|width=200|height=200|resize=250|x=80|y=80|down=30|rt=30|type=box|p-gt=-25|txt=風霊使いウィン}}