Template:CSS crop
{{CSS crop}} creates a crop of a graphics object (like a location map) which cannot be cropped with {{CSS image crop}}. The syntax and code are derivative of {{CSS image crop}}.
Usage
{{CSS crop
|Content = <!-- The unadorned graphics object (typically a location map with border=infobox)-->
|bSize = <!-- The Base object width in pixels (the object we are cropping on)-->
|cWidth = <!-- Cropped Width in pixels-->
|cHeight = <!-- Cropped Height in pixels-->
|oTop = <!-- Offset Top in pixels, optional and defaults to 0 when omitted-->
|oLeft = <!-- Offset Left in pixels, optional and defaults to 0 when omitted-->
|Location = <!-- 'right', 'left', 'center' or 'none'. Determines placement of the cropped object on the page
Defaults to 'right' when description is provided (as is default for thumb images)
When description is blank, location on left (as is default for non-thumbs)-->
|Description = <!-- Description (will render out using thumbnail class)-->
|magnify-link = <!-- The page to be linked by the magnify icon.-->
}}
Examples
Consider the following uncropped location map
{{Location map many|Southeast Asia|width=800|float=center
|caption=Destinations of flights out of Malacca International Airport
{{legend|red|Passenger (including Seasonal Charter)}}
{{legend|green|Cargo}}
|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='''[[Sultan Syarif Kasim II International Airport|PKU]]'''|position2=left
|coordinates3={{coord|5.174970|100.163671}}|mark3size=6|label3_size=85 |label3='''[[Penang International Airport|PEN]]'''|position3=left
}}
Using the {{CSS crop}} template, we can crop this map by (1) adding |border=infobox to the location map and (2) passing to the {{CSS crop}} template through the |Content= parameter.
{{CSS crop
|Location=center
|Description=Destinations of flights out of Malacca International Airport
{{legend|red|Passenger (including Seasonal Charter)}}
{{legend|green|Cargo}}
|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='''[[Sultan Syarif Kasim II International Airport|PKU]]'''|position2=left
|coordinates3={{coord|5.174970|100.163671}}|mark3size=6|label3_size=85 |label3='''[[Penang International Airport|PEN]]'''|position3=left
}}
}}
See also
- {{CSS image crop}}
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.