Difference between revisions of "User:Tsutomu25/sandbox/Cover3"

From Detective Conan Wiki
Line 29: Line 29:
 
  display: inline-block;
 
  display: inline-block;
 
  width: 90px;
 
  width: 90px;
  height: calc(1em + 13px);
+
  height: auto;
 +
padding-bottom: 7px;
 
  transition: 0.3s ease-in;
 
  transition: 0.3s ease-in;
 
  visibility: hidden;
 
  visibility: hidden;
Line 45: Line 46:
 
  align-items: center;
 
  align-items: center;
 
  width: 90px;
 
  width: 90px;
  height: 1em;
+
  height: auto;
 +
padding: 3px;
 
  background-color: white;
 
  background-color: white;
 
  border-radius: 4px;
 
  border-radius: 4px;

Revision as of 12:29, 26 August 2025

It hides the given input of spoiler text and reveals them when the user clicks on them. It takes two values. One is the name of the spoiler and another one is the actual spoiler text. Every time the template is used, every element has to have a unique id and class. Hence spoiler name is required.

Usage

The following is a list of required parameters:

{{User:Tsutomu25/sandbox/Cover3|<spoiler name>|<spoiler text>}}

Limitations

  • When the template is used multiple times on the same page, only one spoiler can remain visible at a time. If the user reveals another spoiler, the previously opened one will automatically be hidden.
  • If the page is refreshed while a spoiler is revealed, that spoiler will remain open even after the page reloads.

Examples

Result: Show SpoilersHide SpoilersThe weapon is Knife

Result: Show SpoilersHide SpoilersThe culprit wore Orange clothes

Result: Show SpoilersHide SpoilersThe culprit is Gosho Aoyama