[英]How to adjust the zoom of website at different browser at different screen size?
I have deployed a website it's zoom is fine at screen resolution 1920x1080. 我已经部署了一个网站,它的缩放比例在屏幕分辨率1920x1080时还可以。 I want to zoom 80% at screen resolution 1366x768. 我想以屏幕分辨率1366x768缩放80%。
I tried to set 我试图设定
@media only screen and (min-width: 768px) {
body {zoom: 80%;}
}
It works fine in chrome but not working properly in internet explorer and microsoft edge. 它在chrome中工作正常,但在Internet Explorer和Microsoft Edge中无法正常工作。
I have used meta tag for viewport. 我已将meta标签用于视口。
<meta name="viewport" content="width=device-width, initial-scale=0.6, maximum-scale=1, user-scalable=0">
I expect the output that at screen resolution 1366x768 the zoom of page is set to 80%. 我希望在屏幕分辨率为1366x768的情况下,页面缩放比例设置为80%。 And it should be compatible with all browser. 并且它应该与所有浏览器兼容。
try using scale
尝试使用scale
@media only screen and (min-width: 768px) {
transform:scale(0.8)
transform-origin: 0 0;
}
You can use media queries https://www.w3schools.com/cssref/css3_pr_mediaquery.asp 您可以使用媒体查询https://www.w3schools.com/cssref/css3_pr_mediaquery.asp
Maybe this can help you too https://css-tricks.com/snippets/html/responsive-meta-tag/ 也许这也可以为您提供帮助https://css-tricks.com/snippets/html/sensitive-meta-tag/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.