JSFiddle - React, Tailwind, and code Playground

by von

HTML

<!DOCTYPE html>
<html>
  <head>
    <head>
      <meta name="viewport" content="width=device-width, initial-scale=1" />
      <style>
        *, *::after, *::before {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        p {
            padding: 1rem;
        }
        html {
          scroll-behavior: smooth;
        }
        body {
          font-family: Arial, Helvetica, sans-serif;
            margin: 0;
            position: relative;
        }
        button {
            padding: 5px;
        }
        #scroll {
            position: absolute;
            top: 50%
        }

        .modal {
            display: none;
            position: absolute;
            top: 0px;
            border: 0px;
            background: black;
            left: 0px;
            right: 0px;
            height: 100%;
            background-color: rgb(0, 0, 0); /* Fallback color */
            background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */

        }
        /* Modal Content */
        .modal-content {
            position: relative;
          margin: auto;
          width: 80%;
          height: 80vh;
          display: flex;
          justify-content: center;
          align-items: center;
          background-image: url(https://totojikim.com/_images/loading.gif);
          background-position: center;
          background-repeat: no-repeat;
        }

        .modal-content img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            display: block;
            margin: auto;
        }

        /* The Close Button */
        .close {
          color: white;
          font-size: 28px;
          font-weight: bold;
            position: absolute;
            right: 10px;
            top: 0px;
        }

        .close:hover,
        .close:focus {
          color: #000;
          text-decoration: none;
          cursor: pointer;
        }
        .spacer {
           ...