缩放元素及其内容 - CSS3的缩放属性的替代方法? [英] Zooming an element and its contents-- an alternative to CSS3's zoom property?

查看:257
本文介绍了缩放元素及其内容 - CSS3的缩放属性的替代方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有跨浏览器方法来模拟 CSS3的缩放属性

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.

一个解决方案可能是读取元素及其子元素的计算样式,转换所有度量到px,乘以一些因子,然后生成与这些新的样式的HTML / CSS。另一个解决方案可能实际上有意义。 :)

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. :)

重要提示:正确的解决方案不会对它所执行的页面承担任何责任。我们不知道每个元素的大小都是在px中,由外部样式表或任何其他样式。

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.

谢谢!

推荐答案

您可以尝试使用 Scriptaculous 库提供 Effect.Scale 功能。

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

这篇关于缩放元素及其内容 - CSS3的缩放属性的替代方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆