模板:Hover gif
跳至導覽
跳至搜尋
模板文檔
[刷新緩存]
{{Hover gif}}
provides a way for gifs to be displayed but not playing until the user hovers over the image. It uses code from Mediawiki:Common.js and styles from Mediawiki:Common.css. In mobile view, the hover functionality is ignored and gifs play as normal.
Parameters
There are several unnamed parameters:
- File name (no extension)
- Size (defaults to
300x300px
) - Float; can be left, right, center, or inline. inline aligns left rather than fully floating and allows for multiple hover gifs to go on the same line in a gallery. (defaults to
inline
) - Description
Known issue
Sometimes the static thumbnail fails to load, resulting in a blank space with the gif icon overlaid on it. The template otherwise works as normal, and a simple page refresh can fix the issue.
Example
{{Hover gif|Giant Firebolt(demo)|600px|left|An example description}}
When it's left-floating, text placed below the gif will be to the right of it
{{Hover gif|Giant Firebolt(demo)|600px|inline|An example description}}
{{Hover gif|Giant Firebolt(demo)|600px|inline|An example description}}
These are inline and don't fully float
{{Hover gif|Giant Firebolt(demo)|600px|right|An example description}}
When it's right-floating, text placed below the gif will be to the left of it
分類:
- Formatting templates