JSFiddle - React, Tailwind, and code Playground

by velo_ninja

HTML

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        body {
            margin: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100vw;
            height: 100vh;
            background-color: #ffffff;
        }

        .container {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 98vw;
            height: 90vh;
            overflow: auto;
            background-color: rgba(220, 120, 220, 0.8);
            margin-top: 1%;
            margin-bottom: 1%;
        }

        .mainDiv {
            text-align: center;
        }

        .itemsContainer {
            display: flex;
            flex-wrap: nowrap;
            overflow-x: auto;
        }

        .itemDiv {
            min-width: 30%;
            min-height: 45vh;
            width: 90vw;
            height: auto;
            min-height: 8vh;
            margin: auto;
            margin-top: 0.5%;
            padding: 10px;
            border: 2px solid #ccc;
            border-radius: 5px;
            position: relative;
            background: rgba(150, 150, 150, 0.7);
            transition: background-color 0.5s, color 0.8s;
            cursor: pointer;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            position: relative;
            margin-right: 10px;
        }

        .itemDiv:hover {
            background-color: rgba(100, 150, 250, 0.3);
        }

        .itemDiv:hover .idString {
            color: black;
            background-color: rgba(100, 150, 250, 0.9);
            border: 2px solid white;
        }

        .itemDiv:hover .ownerString {
            color: black;
            background-color: rgba(100, 150, 250, 0.9);
            border: 2px solid white;
        }

    ...