模板:Sprite/doc

来自SCP: Sharp Wiki
This is the documentation page. It should be transcluded into the main template page. See Template:Documentation for more information
Lua logo.svg

This template used module Module:Sprite,These scripts are written in Lua.
Read w:Wikipedia:Lua and mw:Extension:Scribunto for more.

This template creates a sprite from a drawing image. Typically used to display many small images on a page to reduce the total number of HTTP connections.

Parameter Function Default
align Set vertical alignmentas text middle
class Add extra CSS classes None
css Add extra CSS styles None
defaultpos Default position 1
image Image without prefix None
link Link to create this page None
name Name, used to
  1. Get location definition: Module:Sprite/<name>
  2. A part of CSS class name(if in imgClasses): <name:lower>-sprite
  3. A part of image name if image is unset: <name>Sprite.png
None
pos Location index, determinate by size and sheetsize(from left top to right top, start from the left top side of sprite) defaultpos
scale Scaling 1
sheetsize Width of sheet in pixels, must be multiplier of size 256
size Width of each sprite in pixels 16
text Some text after sprite, will be a link if link is set None
title A title that, when hovering over a sprite or text, will override the link's title None
Cookie帮助我们提供我们的服务。通过使用我们的服务,您同意我们使用cookie。