I have a webpage with tables and images in it, I would like to add the option to increase / decrease image size, how to Can i do this Something like CTR + plus and CTR + minus
What is it now,
Thank you all for the answer.
You can not increase image size - you display pictures of certain sizes
What you can do:
- Make copies of different sizes of the same image and when the button is pressed, serve them on selected servers.
-
Serve a single large image which will be automatically scaled to fit the dimensions of the element, then resize that element into the Javascript button event handlers.
document.getElementById ("myImgElement"). Width = 300;
Document.getElementById ("myImgElement"). Height = 300;
You should have an image larger than the one you are scaling down. The browser will automatically scale it to fit in the small image element. Note that you will need a sufficiently large image to fit your maximum size. Then downscale using the above code.
Comments
Post a Comment