Szablon:Sprite/opis: Różnice pomiędzy wersjami
Przejdź do nawigacji
Przejdź do wyszukiwania
| [wersja nieprzejrzana] | [wersja nieprzejrzana] |
Utworzył nową stronę „{{doc/start}} 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 conne...” |
Nie podano opisu zmian |
||
| Linia 7: | Linia 7: | ||
|pos=1 | |pos=1 | ||
|align=text-top | |align=text-top | ||
|image= | |image=BlockCSS_new.png | ||
|link=Grass | |link=Grass | ||
|size=16 | |size=16 | ||
| Linia 16: | Linia 16: | ||
|pos=1 | |pos=1 | ||
|align=text-top | |align=text-top | ||
|image= | |image=BlockCSS_new.png | ||
|link=grass | |link=grass | ||
|size=16 | |size=16 | ||
| Linia 31: | Linia 31: | ||
| <code>align</code> || Sets the [http://css-tricks.com/what-is-vertical-align/ vertical alignment] of the image to the text. || middle | | <code>align</code> || Sets the [http://css-tricks.com/what-is-vertical-align/ vertical alignment] of the image to the text. || middle | ||
|- | |- | ||
| <code>image</code> || Sprite sheet image, without prefix || [[:File: | | <code>image</code> || Sprite sheet image, without prefix || [[:File:BlockCSS_new.png|BlockCSS_new.png]] | ||
|- | |- | ||
| <code>link</code> || Create a link to this page || ''None'' | | <code>link</code> || Create a link to this page || ''None'' | ||
Wersja z 10:43, 13 lis 2013
Szablon:Doc/start 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=BlockCSS_new.png
|link=Grass
|size=16
|sheetsize=256
}}
give:
| 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 | BlockCSS_new.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 |
256 |
