Jump to content

Template:Tt/sandbox: Difference between revisions

From Detective Conan Wiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><span class="hover-text">{{{1}}}<span class="tooltip-container"><span class="tooltip"><span class="tooltip-text-container"><span>{{{2}}}</span></span></span></span></span>
<includeonly><span class="tooltip-target">{{{1}}}<span class="tooltip-container tooltip-container-above"><span class="tooltip">{{{2}}}<span class="chevron"></span></span></span></span></includeonly>
{{code
{{code
|css=.hover-text {
|css=.tooltip-target {
      display: inline-block;
        position: relative;
      position: relative;
        display: inline-block;
      text-decoration: underline dotted;
        border-bottom: 0.0625em dotted;
        cursor: help;
     }
     }
   


     .hover-text:hover .tooltip-container {
     .tooltip-container {
      opacity: 1;
        position: absolute;
      pointer-events: auto;
        left: 50%;
        transform: translateX(-50%);
        min-height: 1em;
        width: 170px;
        padding: 10px 0 8px;
        display: flex;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: 0.3s ease 0.1s;  
     }
     }
 
   
     .tooltip-container {
     .tooltip-container-above {
      opacity: 0;
        bottom: 90%;
      pointer-events: none;
        transform: translate(-50%, 3px);
      transition: opacity .3s ease
    }
   
    .tooltip-container-below {
        top: 90%;
        transform: translate(-50%, -3px);
     }
     }
 
   
   
     .tooltip {
     .tooltip {
      position: absolute;
        background: #fff;
      bottom: 100%;
        border-radius: 4px;
      left: 50%;
        filter: drop-shadow(0 1px 4px rgba(0,0,0,0.6));
      background: #fff;
        padding: 6px 9px;
      color: #222;
        max-width: 100%;
      padding: 4px 8px;
        height: min-content;
      border: 1px solid #a9caf3;
        word-wrap: break-word;
      border-radius: 4px;
        z-index: 999;
      box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.3);
        text-align: center;
      z-index: 999;
      width: max-content;
      max-width: 150px;
      overflow-wrap: break-word;
      text-align: center;
      transform: translateX(-50%) translateY(5px);
      transition: transform .3s ease;
     }
     }
 
   
     .hover-text:hover .tooltip {
    .chevron {
      transform: translateX(-50%) translateY(0);
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-style: solid;
        z-index: 998;
    }
   
    .tooltip-container-above .chevron {
        top: 95%;
        border-width: 9px 9px 0 9px;
        border-color: #fff transparent transparent transparent;
    }
   
    .tooltip-container-below .chevron {
        bottom: 95%;
        border-width: 0 9px 9px 9px;
        border-color: transparent transparent #fff transparent;
    }
   
   
     .tooltip-target:hover .tooltip-container-above {
        opacity: 1;
        transform: translate(-50%, 0);
        pointer-events: auto;
        user-select: auto;
        -webkit-user-select: auto;
        -ms-user-select: auto;
    }
   
    .tooltip-target:hover .tooltip-container-below {
        opacity: 1;
        transform: translate(-50%, 0);
        pointer-events: auto;
        user-select: auto;
        -webkit-user-select: auto;
        -ms-user-select: auto;
     }
     }
 
   
     .tooltip-text-container {
     .tooltip-target:hover {
      font-size: 90%;
        border-bottom: 0.0625em dashed;
      margin-bottom: 1px;
     }
     }
}}</includeonly><noinclude>
   
<pre>text text {{tt|Hover me|blablablablabla}} text text</pre>
}}<noinclude>We love {{tt/sandbox|DC|Detective Conan}}</noinclude>
Results in: text text {{tt/sandbox|Hover me|blablablablabla}} text text
</noinclude>

Revision as of 12:05, 7 June 2025

We love DCDetective Conan