gpt4 book ai didi

css - 跨浏览器 CSS 缩放的完整样式

转载 作者:技术小花猫 更新时间:2023-10-29 10:12:53 27 4
gpt4 key购买 nike

我发现很难获得完全跨浏览器的 CSS 缩放属性..我只有这些

zoom: 2;
-moz-transform: scale(2);

最佳答案

这些对于跨浏览器就足够了......

Demo

Note: As @martin pointed out that this may not work as intended, doesn't mean this fails, Chrome just makes it 2x larger than other browsers, because it RESPECTS zoom property as well. So it makes it 2x larger...

zoom: 2; /* IE */
-moz-transform: scale(2); /* Firefox */
-moz-transform-origin: 0 0;
-o-transform: scale(2); /* Opera */
-o-transform-origin: 0 0;
-webkit-transform: scale(2); /* Safari And Chrome */
-webkit-transform-origin: 0 0;
transform: scale(2); /* Standard Property */
transform-origin: 0 0; /* Standard Property */

HTML

<div class="zoom">BlahBlah</div>

CSS

.zoom {
zoom: 2;
-moz-transform: scale(2);
-moz-transform-origin: 0 0;
-o-transform: scale(2);
-o-transform-origin: 0 0;
-webkit-transform: scale(2);
-webkit-transform-origin: 0 0;
transform: scale(2); /* Standard Property */
transform-origin: 0 0; /* Standard Property */
}

关于css - 跨浏览器 CSS 缩放的完整样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13393588/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com