FANDOM


  • I wanna add a blinking text to my spoiler template. Any idea on how I can do that?

      Loading editor
    • Don't do it.

        Loading editor
    • I agree with everyone else in that I think this is unnecessary and I encourage you to really rethink about whether or not you really need this.

      That said, if you want to do it, here is one way. First, add the following to your wiki's CSS.

      @keyframes blink {
          50% {
              visibility: hidden;
          }
      }
       
      #mw-content-text .blink,
      #WikiaRail .blink {
          animation: blink 2s step-end infinite;
      }

      Then, add "blink" as a class to whichever element is appropriate given which text you want to have blinking. For example:

      This text doesn't blink but<span class="blink"> this text does</span>.
      

      Given the above CSS, the blinking text should initially show and then alternate between showing and hiding every second. You can adjust the timing of the blinking by setting the "animation-duration" property via in-line CSS. For example:

      This text doesn't blink but<span class="blink" style="animation-duration: 1s;"> this text does</span>.
      

      This would change states every half second instead of every second.

        Loading editor
    • Maybe I shouldn’t do it, but thx anyways

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.