JSFiddle - React, Tailwind, and code Playground
HTML
<button type="button" onclick="ChangeZoomLevel(10);" style="position:absolute;top:2px;left:2px;z-index:1000;">+</button>
<button type="button" onclick="ChangeZoomLevel(-10);" style="position:absolute;top:2px;left:35px;z-index:1000;">-</button>
<div id="Contents" ><img alt-""="" src="http://www.google.com/logos/2012/carnival12-hp.png" id="imgac1"> as it contains every letter of the alphabet: 'A quick brown fox jumps over the very lazy dog.'"[2]
As the use of typewriters grew in the late 19th century, the phrase began appearing in typing and stenography lesson books as a practice sentence. Early examples of publications which utilized the phrase include Illustrative Shorthand by Linda Bronson (1888),[3] How to Become Expert in Typewriting: A Complete Instructor Designed Especially for the Remington Typewriter (1890),[4] and Typewriting Instructor and Stenographer's Hand-book (1892). By the turn of the 20th century, the phrase had become widely known. In the January 10, 1903, issue of Pitman's Phonetic Journal, it is referred to as "the well known memorized typing line embracing all the letters of the alphabet".[5] Robert Baden-Powell's book Scouting for Boys (1908) uses the phrase as a practice sentence for signalling.</div>
JavaScript
var _zoomLevel = 100;
function ChangeZoomLevel(diff) {
_zoomLevel += diff;
var oDiv = document.getElementById("Contents");
if (typeof oDiv.style.MozTransform == "string")
oDiv.style.MozTransform = "scale(" + (_zoomLevel / 100) + ")";
else if (typeof oDiv.style.zoom == "string")
oDiv.style.zoom = _zoomLevel + "%";
else if (typeof oDiv.style.OTransform == "string")
oDiv.style.OTransform = "scale(" + (_zoomLevel / 100) + ")";
else if (typeof oDiv.style.WebkitTransform == "string")
oDiv.style.WebkitTransform = "scale(" + (_zoomLevel / 100) + ")";
else if (typeof oDiv.style.MsTransform == "string")
oDiv.style.MsTransform = "scale(" + (_zoomLevel / 100) + ")";
else if (typeof oDiv.style.transform == "string")
oDiv.style.transform = "scale(" + (_zoomLevel / 100) + ")";
}