简体   繁体   中英

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. I want to zoom 80% at screen resolution 1366x768.

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.

I have used meta tag for viewport.

<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%. And it should be compatible with all browser.

try using scale

@media only screen and (min-width: 768px) {
 transform:scale(0.8)
 transform-origin: 0 0;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM