JSFiddle - React, Tailwind, and code Playground

by Barney Carroll

HTML

<ul class="nav">
    <li>
        Menu item
    </li>
    <li>
        Menu item
    </li>
    <li>
        Menu item
    </li>
</ul>

CSS

.nav {
    background: red;
    list-style: none;
    padding-left: 125px;
    position: relative;
}

li:before {
    content: '';
    display: none;
    height: 125px;
    left: 0;
    position: absolute;
    top: 0;
    width: 125px;
}

li:hover:before {
    display: block;
}

li:nth-child(1):before {
    background-image: url(http://lorempixel.com/125/125/sports/);
}

li:nth-child(2):before {
    background-image: url(http://lorempixel.com/125/125/nightlife/);
}

li:nth-child(3):before {
    background-image: url(http://lorempixel.com/125/125/abstract/);
}

li {
    background: grey;
    padding: 1em;
}

li:hover {
    background: green;
}