JSFiddle - React, Tailwind, and code Playground

by shriek

HTML

<div class="bar">
  <p>Wrong</p>
  </div>

CSS

.bar {
  position: absolute;
  top: -50px;
  width: 100%;
  height: 50px;
  background-color: red;
  text-align: center;
  color: #fff;
  animation: 0.25s slidein ease-out forwards;
}

@keyframes slidein {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
    top: 0;
  }
}