JSFiddle - React, Tailwind, and code Playground

HTML

<!-- These elements have IDs -->
<div id="div1"></div>
<div id="div2"></div>

<!-- Apply and ID and Class to element -->
<div id="div3" class="circle"></div>

<div class="circle"></div>

CSS

/* generic rules for all divs */

div {
   position: absolute; /*removes element from document flow*/
   width: 300px;
   height: 100px;
   background: gray;
}

/*target elements by class using "." */

.circle {
    width: 100px;
    height: 100px;
    border-radius: 50px;
}

/* target elements by id using "#" */

#div1 {
    top: 40px;
    left: 25px;
    height: 200px;
    background: red;
    opacity: .5;
    z-index: 20;
}

#div2 {
    top: 100px;
    background: orange;
    z-index: 10;
}

#div3 {
    top: 50px;
    background: blue;
    opacity: .3;
    z-index: 30;
}