Difference between revisions of "Template:Sprite"
From The Lion King Wiki
(Created page with "<includeonly><div style="position: relative; height: {{{size|16}}}px; width: {{{size|16}}}px; overflow: hidden; display: inline-block; vertical-align: {{{align|middle}}};"><div s...") |
|||
Line 2: | Line 2: | ||
{{/doc}} | {{/doc}} | ||
− | [[Category: | + | [[Category:Image templates|S]]</noinclude> |
Latest revision as of 14:41, 3 April 2011
This template creates a sprite from a sheet image. Commonly used when many small images are displayed on one page to reduce the total amount of HTTP connections.
Examples
{{Sprite |pos=1 |align=text-top |image=CommentCSS.png |link=Help:Contents |size=16 |sheetsize=48 }}Will Output:
Parameter | Function | Default value |
---|---|---|
pos |
Position index of the sprite, depends on size and sheetsize (left to right, starting at top-left sprite) |
1 |
align |
Sets the vertical alignment of the image to the text. | middle |
image |
Sprite sheet image, without prefix | CommentCSS.png |
link |
Create a link to this page | None |
size |
Size of each sprite in pixels, width and height | 16 |
sheetsize |
Size of the whole sheet in pixels, width and height, must be multiple of size |
48 |
The above documentation is transcluded from Template:Sprite/doc. (edit | history)