JSFiddle - React, Tailwind, and code Playground

by NickU

HTML

<div

JavaScript

function insertCss(code)
{
    var style = document.createElement('style');
    style.type = 'text/css';

    if (style.styleSheet)
    {
        // IE
        style.styleSheet.cssText = code;
    } else
    {
        // Other browsers
        style.innerHTML = code;
    }

    document.getElementsByTagName("head")[0].appendChild(style);
}

dezireZoom = parseInt(actualWidth / disireWidth * 100000) / 100000.0;

                if (dezireZoom < 0.75)
                    dezireZoom = 0.75;

                if (dezireZoom > 1)
                    dezireZoom = 1;
                    
                    insertCss(".zoomin { zoom: " + dezireZoom + "; }");