1

for zooming I am using el.style.zoom = 1.5; el.style.WebkitTransform = 'scale(1.5)';

here e1 will be ,

I use webkit based browsers.

Now how do I zoom back to original size ? Confused bec document says for zoom out have to use less than 1, and how to scale back to original size in webkit ?

1 Answer 1

2

Use percentages.

For zoom in:

el.style.zoom = "150%";

For zoom to normal:

el.style.zoom = "100%";

This should work in webkit browsers.

Sign up to request clarification or add additional context in comments.

2 Comments

Cool , It works. Any Idea how to zoom in a image on particular point ? Main problem here is I cannot centre the image where I want to zoom.
@sat: Sure, use zoom (or a larger image) and absolutely position the image in a relatively positioned <div /> that has its overflow set to hidden and then position the image inside it as needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.