There is a site on which you need to add a button, when clicked, which would be simulated pressing CTRL + NUM '+', up to 120% of the initial size. Is it possible to do this and in what ways? (I don’t really know which of the tags this question relates to, since I have little idea about the web-e)
1 answer
Try this option:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title></title> <style> .zoom { zoom: 1.2; -moz-transform: scale(1.2); -moz-transform-origin: 0 0; } </style> </head> <body> <button id="zoom">Zoom</button> <script> document.querySelector('#zoom').addEventListener('click', function(e) { document.body.className += ' zoom'; }); </script> </body> </html> |