Szablon:Sprite: Różnice pomiędzy wersjami

Z Minecraft Wiki Polska
Przejdź do nawigacji Przejdź do wyszukiwania
[wersja nieprzejrzana][wersja nieprzejrzana]
Utworzył nową stronę „<includeonly><div style="position: relative; height: {{{size|16}}}px; width: {{{size|16}}}px; overflow: hidden; display: inline-block; vertical-align: middle;"><div sty...”
 
Nie podano opisu zmian
Linia 1: Linia 1:
<includeonly><div style="position: relative; height: {{{size|16}}}px; width: {{{size|16}}}px; overflow: hidden; display: inline-block; vertical-align: middle;"><div style="position: absolute; height: {{{sheetsize|256}}}px; width: {{{sheetsize|256}}}px; {{Sprite/pos|{{{pos|1}}}|{{{size|16}}}|{{{sheetsize|256}}}}}">[[File:{{{image|BlockCSS.png}}}|link={{{link|}}}]]</div></div></includeonly><noinclude>
<includeonly><div style="position: relative; height: {{{size|16}}}px; width: {{{size|16}}}px; overflow: hidden; display: inline-block; vertical-align: middle;"><div style="position: absolute; height: {{{sheetsize|256}}}px; width: {{{sheetsize|256}}}px; {{Sprite/pos|{{{pos|1}}}|{{{size|16}}}|{{{sheetsize|256}}}}}">[[Plik:{{{obraz|BlockCSS.png}}}|link={{{link|}}}]]</div></div></includeonly><noinclude>
==Documentation==
==Documentation==
'''These usage notes will not be included in articles bearing this template.'''
'''These usage notes will not be included in articles bearing this template.'''
Linia 8: Linia 8:


{| class="wikitable"
{| class="wikitable"
! Parameter
! Parametr
! Function
! Funkcja
! Default value
! Domyślna wartość
|-
|-
| <code>pos</code> || Position index of the sprite, depends on <code>spritesize</code> and <code>sheetsize</code> (left to right, starting at top-left sprite) || 1
| <code>pos</code> || Position index of the sprite, depends on <code>spritesize</code> and <code>sheetsize</code> (left to right, starting at top-left sprite) || 1

Wersja z 18:48, 20 sty 2011

Documentation

These usage notes will not be included in articles bearing this template.

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.

Example:


Parametr Funkcja Domyślna wartość
pos Position index of the sprite, depends on spritesize and sheetsize (left to right, starting at top-left sprite) 1
image Sprite sheet image, without prefix File:BlockCSS.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