views:

310

answers:

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 ?

A: 

Use percentages.

For zoom in:

el.style.zoom = "150%";

For zoom to normal:

el.style.zoom = "100%";

This should work in webkit browsers.

Dan Herbert
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
@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.
Dan Herbert