JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div></div>
CSS
html {
width: 100%;
overflow: hidden;
}
body {
margin: 0;
transform-origin: top left;
}
@supports (transform: scale(1)) {
body {
-ms-zoom: 1 !important;
zoom: 1 !important;
}
}
div {
width: 1024px;
height: 128px;
background: url(//i.stack.imgur.com/eMSCb.png) repeat-x;
background: repeating-linear-gradient(to right, blue, red 256px);
}
JavaScript
~function () {
var $window = $(window), $body = $("body");
var ie = document.documentMode;
function updateSizes() {
var width = $window.width(), scale = Math.min(width / 1024, 1);
var style = $body[0].style;
style.msZoom = ie === 8 || ie === 9 ? scale : 1;
style.zoom = ie === 10 || ie === 11 ? 1 : scale;
style.mozTransform = "scale(" + scale + ")";
style.oTransform = "scale(" + scale + ")";
style.transform = "scale(" + scale + ")";
}
$window.resize(updateSizes);
updateSizes();
}();