本文介绍了如何防止在Windows 8.1 / 8上的Modern UI IE 11中自动缩放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows 8.1 / 8具有分屏功能,在一个屏幕中使用多个应用程序(如现代UI版本IE11)时效果不错。大多数情况下,当您将IE分屏设置得非常窄时,您会注意到网页自动缩小,但某些页面(如microsoft.com)则不同。它们不会缩小并正确识别窄的宽度,所以很容易做出一些响应的设计。



我的问题是:什么代码能够改变这种差异?我试过< meta name ='viewport'content ='width = device-width,user-scalable = 0,initial-scale = 1.0'/> 但IE11仍然缩小页面。

解决方案

我最终得到了答案。简短版本为:

  @media screen {
@ -ms-viewport {width:device-width; }
}

完整的解释是在

Windows 8.1/8 has a split screen feature which is nice while using multiple apps (like modern UI version IE11) in one screen. Most of the time when you set the IE split screen very narrow, you'll notice the web page zoomed out automatically, but some pages (like microsoft.com) are different. They doesn't zoom out and recognise the narrow width correctly, so it's easy to do some responsive deign.

My question is: What code made that difference? I've tried <meta name='viewport' content='width=device-width, user-scalable=0, initial-scale=1.0' /> but IE11 still zooms out the page.

解决方案

I got the answer finally. The short version is:

@media screen {
    @-ms-viewport { width: device-width; }
}

The full explaination is at http://msdn.microsoft.com/en-us/library/ie/hh708740(v=vs.85).aspx

这篇关于如何防止在Windows 8.1 / 8上的Modern UI IE 11中自动缩放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 23:40