缩放div的内容百分比? [英] Scale the contents of a div by a percentage?
问题描述
建立一个内容管理系统,用户可以在其中移动框以构建页面布局(基本概念)。
Building a CMS of sorts where the user can move around boxes to build a page layout (basic idea anyway).
我想提取实际内容
我意识到我可以有2套CSS - 一个用于实际的前面的页面,一个为管理工具,只是收缩一切相应,但这似乎是一个痛苦的维护。
I realize I could have 2 sets of CSS - one for the actual front-facing page, and one for the admin tool and just shrink everything accordingly, but that seems like a pain to maintain.
我希望可能有某种jquery或CSS或者允许我填充一个div并赋予它50%缩放的属性(?)。
I was hoping there might be some kind of jquery or CSS or something that would allow me to populate a div and give it the properties (?) of 50% scale.
推荐答案
您只需使用 zoom 属性:
#myContainer{
zoom: 0.5;
-moz-transform: scale(0.5);
}
其中myContainer包含您正在编辑的所有元素。所有主流浏览器都支持此功能。
Where myContainer contains all the elements you're editing. This is supported in all major browsers.
这篇关于缩放div的内容百分比?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!