JSFiddle - React, Tailwind, and code Playground

by Hitesh Trivedi

HTML

<a href="#demo1">Demo1</a>
<a href="#demo2">Demo2</a>

<div id="demo1">
    <h2>Demo1</h2>
    Hello....Hello....
    Hello....Hello....
    Hello....Hello....
</div>

<div id="demo2">
    <h2>Demo2</h2>
    Hello....Hello....
    Hello....Hello....
    Hello....Hello....
</div>

CSS

:target {
  -webkit-animation: highlight 2s ease;  
  -moz-animation: highlight 2s ease;
  
}
@-webkit-keyframes highlight {
  0% { background-color: red; }
  100% { background-color: white; }
}
@-moz-keyframes highlight {
  0% { background-color: red; }
  100% { background-color: white; }
}