开发者

How to scale all contents of a DIV by a certain percentage?

开发者 https://www.devze.com 2023-03-17 00:12 出处:网络
I want to do a sort of zoom-in/zoom-out effect, by animating all the dimensions of the contents (text, images, divs, etc) of a div by a certai开发者_高级运维n percentage.

I want to do a sort of zoom-in/zoom-out effect, by animating all the dimensions of the contents (text, images, divs, etc) of a div by a certai开发者_高级运维n percentage.

How can I do this? Similar to this: http://www.google.com/intl/en-US/+/demo/


That website uses the Maps API with custom tiles. You can look at the Maps API and do the same. But it is not really zooming text, btw. The tiles are all divs and images. As you reach the end of the animation, new set of images are brought in to replace the old depending on the zoom level.

You can use jQuery animate() to scale your elements. You can also use canvas like @Babak mentioned, but I don't know if you want to go that far, I need to know more of your requirements.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号