JSFiddle - React, Tailwind, and code Playground

by Kate Masiuk

HTML

<div class="scale">
    <div class="red">
        -
    </div>
    <div class="green">
        +
    </div>
</div>

CSS

div.scale {
    background: #A4A4A4;
    width: 100%;
    height: 45px;
    border-radius: 5px;
}

div.scale::before {
    content: '9691';
    width: 100px;
    height: 33px;
    color: #fff;
    font-size: large;
    background: #A5D552;
    display: block;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    text-align: center;
    padding-top: 12px;
}

div.scale::after {
    content: '6';
    width: 100px;
    height: 33px;
    color: #fff;
    font-size: large;
    text-align: center;
    padding-top: 12px;
    position: absolute;   
    right: 17px;
    top: 10px;
}

.red, .green {
    color: #fff;
    width: 25px;
    border-radius: 5px;
    text-align: center;
    position: absolute;
    box-shadow: 0 0 5px #000;
    font-family: Impact;
}

.red {
    background: #A43131;
    height: 23px;
    right: 90px;
    top: 18px;
    padding-top: 2px;
}

.green {
    background: #A5D552;
    height: 22px;
    right: 18px;
    top: 18px;
    padding-top: 3px;
}