JSFiddle - React, Tailwind, and code Playground

HTML

<div id="calc"><h1>Press </br>the</br><span class="red">red</span></br> button</h1></div>

CSS

body {background:yellow;padding:50px}

#calc {
    background-image:url(http://2.imimg.com/data2/WC/YF/MY-2993865/a-250x250.jpg);
    background-repeat:no-repeat;
    background-position:center;
    background-size:contain;
    background-color:red;
    position:absolute;
width:100%;height:100%;}

#calc h1{ font-family:impact; font-weight:6em; text-align:center}

.red {color:red}

JavaScript

$( document ).ready( function() {
                var $body = $('body'); //Cache this for performance
                
                var setBodyScale = function() {
                    var scaleFactor = 0.2,
                        scaleSource = $body.width(),
                        maxScale = 600,
                        minScale = 30;

                    var fontSize = scaleSource * scaleFactor; //Multiply the width of the body by the scaling factor:

                    if (fontSize > maxScale) fontSize = maxScale;
                    if (fontSize < minScale) fontSize = minScale; //Enforce the minimum and maximums

                    $('body').css('font-size', fontSize + '%');
                }
            
                $(window).resize(function(){
                    setBodyScale();
                });
                
                //Fire it when the page first loads:
                setBodyScale();
            });