JSFiddle - React, Tailwind, and code Playground

by iKeler

HTML

<div class="frame1">           
            <p class="text-on-background">
                <span style="color: #a3197b">background-text</span> 
                <span style="color: #2a6cb6">background-text</span> 
                <span style="color: #db2f36">background-text</span> 
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
                <span style="color: #9d58cc">background-text</span>
               ...

CSS

.frame1 {

    width: 600px;
    height: 800px;
    position:relative;
    margin: 0 auto;
    z-index: -9999;
    overflow:hidden;
}

.text-on-background {

    width: 600px;
    position: absolute;
    z-index: -1;
    font-weight: 700;
    font-size: 3em;
    line-height: 1;
    top: -20px;
    text-align: center;
}

.wolter {

    width: 600px;
    height: 800px;
    background: url("http://impressiv.net/test/wolter.png");
    z-index: 9999;
    margin: 0 auto;
    opacity: 0.6;
}   

.countour {

    position:absolute;
    width: 600px;
    height: 800px;
    background: url("http://impressiv.net/test/countour.png");
    z-index: 99999;
    margin: 0 auto;
}