moz变换比例减小div大小问题
我在 mozilla moz-transform 缩放属性方面遇到问题。
我正在寻找 Zoom 属性的替代品,它在除 Firefox 之外的所有平台上都能正常工作。
当我想缩小 div 时,它的“内容”确实缩小了,但容器的大小保持不变,在其他内容周围留下了很大的间隙。
有什么方法可以强制容器大小也减小吗?
为了澄清这一点,我在此处放置了一个简单的示例。
在chrome和firefox中打开它,你会看到区别。
I'm having problems with mozilla moz-transform scale property.
I'm looking for a replacement of the zoom property, which works fine in everything except firefox.
When I want to shrink the div, its "content" does shrink, but the size of the container stays the same, leaving a big gap around other content.
Is there any way I can force the container size to decrease as well?
To clarify I put a simple example here.
Open it in chrome and firefox, you will see the difference.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
到目前为止我得到的唯一解决方案是将其全部包装在另一个具有固定高度的 div 容器中。
这并不是我真正想要的,但在有人找到更好的解决方案之前,我认为这是唯一的出路。
The only solution I have got so far is to wrap it all in another div container, with fixed height.
Not really what I was looking for, but until someone finds a better solution, I think its the only way to go.
为什么不在 Chrome 中使用
-webkit-transform
,而不是混合使用zoom
和-moz-transform
?然后您可以在所有浏览器上均匀地调整高度。Instead of mixing
zoom
and-moz-transform
, why not use-webkit-transform
for Chrome? Then you can adjust the height equally on all browsers.