Zooming an element and its contents— an alternative to CSS3's zoom property?

By : Justin
Source: Stackoverflow.com

Is there a cross-browser method to emulate CSS3's zoom property? I know how to zoom images and text separately, but cannot seem to keep everything aligned.

One solution might be to read the computed styles of the element and its children, convert all measures to px, multiply them by some factor, and then generate HTML/CSS with these new styles. Another solution might actually make sense. :)

Important: A correct solution assumes nothing about the page it acts on. We don't know that every element is sized in px, styled by an external stylesheet, or anything else.


By : Justin


Turns out that yes, jQuery also has an Effect.scale.

Thanks, Diodeus, for pointing me in the right direction.

By : Justin

You could try using the Scriptaculous library that provides Effect.Scale functionality.

By : Diodeus

I would write something that loads the python script up. This way you could even get energetic and include formatting and styling of the code. You could even write it in python since you will not have precluded that by file extension.

This video can help you solving your question :)
By: admin