moz-transform scale decrease div size problem

我是研究僧i 提交于 2019-12-10 12:40:38

问题


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.


回答1:


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.




回答2:


Instead of mixing zoom and -moz-transform, why not use -webkit-transform for Chrome? Then you can adjust the height equally on all browsers.



来源:https://stackoverflow.com/questions/6347725/moz-transform-scale-decrease-div-size-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!