Template:IconHover: Difference between revisions
From Elwiki
Shironsaki (talk | contribs) No edit summary |
Shironsaki (talk | contribs) (Undo revision 437571 by Shironsaki (talk)) |
||
Line 1: | Line 1: | ||
<table style="display: inline-table; {{#if:{{{style|}}}|{{{style}}}}}"> | <table style="display: inline-table; {{#if:{{{style|}}}|{{{style}}}}}"> | ||
<tr> | <tr> | ||
<td valign="middle" style="text-align: center;"> | |||
<p class="fadeout-container {{#ifeq:{{{hidebottom}}}|true|fadeout-hide-bottom}}"> | <p class="fadeout-container {{#ifeq:{{{hidebottom}}}|true|fadeout-hide-bottom}}"> | ||
<span class="fadeout" style="position: absolute; width: {{{width|120px}}}">[[File:{{{image-up|LKNEW.png}}}|{{{width|120px}}}{{#if:{{{link|}}}|{{!}}link={{{link}}}}}{{#if:{{{title|}}}|{{!}}{{{title}}}}}]] | <span class="fadeout" style="position: absolute; width: {{{width|120px}}}">[[File:{{{image-up|LKNEW.png}}}|{{{width|120px}}}{{#if:{{{link|}}}|{{!}}link={{{link}}}}}{{#if:{{{title|}}}|{{!}}{{{title}}}}}]] | ||
Line 8: | Line 9: | ||
</span> | </span> | ||
</p> | </p> | ||
</td> | |||
</tr> | </tr> | ||
</table><noinclude> | |||
<pre> | <pre> | ||
{{ButtonHover | {{ButtonHover |
Revision as of 04:20, 10 February 2017
{{ButtonHover |image-up= |image-down= |width= |link= |title= |style= }}
- image-up: the top image file link.
- image-down: the bottom image file link.
- width: thewidth of the images (the default is 120px).
- link: a link when pressing the button.
- title: a title that will appear when hovering above the button.
- style: extra style for the table.
All of those parameters are optional. By default they display a red 120px button.
Please note that the sizes of image 1 and image 2 should be the same.
Hide bottom image
In order to hide the bottom image, and only show it when hovering above the top image, add another parameter:
|hidebottom= true
However, it will not be displayed this way in editing mode.