This little example mark-up shows you how to zoom in a div by a specific percentage using only CSS.
- <html>
- <body>
- <div id=“sampleDiv” style=“width: 100px; background-color: Gray;”>
- Zoom Me
- </div>
- <button onclick=“sampleDiv.style.zoom=’300%'”>Zoom 300%</button>
- <button onclick=“sampleDiv.style.zoom=’200%'”>Zoom 200%</button>
- <button onclick=“sampleDiv.style.zoom=’100%'”>Zoom 100%</button>
- </body>
- </html>