Template:CSS crop

维基百科,自由的百科全书
文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

本模板用以針對無法使用{{CSS image crop}}裁切的圖像創建裁切縮圖。

用法[编辑]

{{CSS crop
|Content       = 圖片物件 (通常是包含border=infobox資訊的{{tl|Location map}})
|bSize         = 底圖的尺寸
|cWidth        = 圖像剪裁的寬度
|cHeight       = 圖像剪裁的高度
|oTop          = 從上位移的像素值,默認為 0
|oLeft         = 從左位移的像素值,默認為 0
|Location      = 'right', 'left', 'center', 'none'
                 當description參數有值時,此欄預設值為'right',若無description則預設值為'left'
|Description   = 描述
|Link          = 連結的條目
|magnify-link  = 用放大圖標連結的圖像(如果 Image 參數是用 {{Annotated image}} 設置的,或者 Link 參數指向除圖像以外的連結)。
}}

示例[编辑]

下方為一個未經裁切的location map:

麻六甲國際機場 (MKZ) 出發的航班目的地
  乘客 (包含季節性的包機航線)
  貨物
{{Location map many|Southeast Asia|width=800|float=center
|caption=麻六甲國際機場 (MKZ) 出發的航班目的地
{{legend|red|乘客 (包含季節性的包機航線)}}
{{legend|green|貨物}}
|coordinates1={{coord|2.154700|102.15090}}|mark1=BSicon FLUGg.svg|mark1size=10|label1_size=100 |label1='''[[馬六甲國際機場|MKZ]]'''|position1=left
|coordinates2={{coord|0.273900|101.2640}}|mark2size=6|label2_size=85 |label2='''[[蘇丹謝里夫·卡西姆二世國際機場|PKU]]'''|position2=left
|coordinates3={{coord|5.174970|100.163671}}|mark3size=6|label3_size=85 |label3='''[[檳城國際機場|PEN]]'''|position3=left
}}

透過此模板裁切上述地圖的步驟如下: 1. 在location map中新增 |border=infobox; 2. 將語法複製至本模板的|Content= 參數中。

麻六甲國際機場 (MKZ) 出發的航班目的地
  乘客 (包含季節性的包機航線)
  貨物
{{CSS crop
|Location=center
|Description=麻六甲國際機場 (MKZ) 出發的航班目的地
{{legend|red|乘客 (包含季節性的包機航線)}}
{{legend|green|貨物}}
|bSize=800
|cWidth=350
|cHeight=300
|oLeft=40
|oTop=240
|Content=
{{Location map many|Southeast Asia|width=800|float=center|border=infobox
|caption=
|coordinates1={{coord|2.154700|102.15090}}|mark1=BSicon FLUGg.svg|mark1size=10|label1_size=100 |label1='''[[馬六甲國際機場|MKZ]]'''|position1=left
|coordinates2={{coord|0.273900|101.2640}}|mark2size=6|label2_size=85 |label2='''[[蘇丹謝里夫·卡西姆二世國際機場|PKU]]'''|position2=left
|coordinates3={{coord|5.174970|100.163671}}|mark3size=6|label3_size=85 |label3='''[[檳城國際機場|PEN]]'''|position3=left
}}
}}

參見[编辑]